A classic snake game made in C++ using SFML library.
- CMake 3.1 or above - https://cmake.org/download/
cmake . -Bbuild && cmake --build ./build
./snake
- The edges of the playing area can't be traversed.
- The food and extra food position is random but they can't appear in Snake's position.
- When Snake eats one item of food, one block is added to the tail and food spawns on random position.
- Speed of Snake depends on its length. The longer Snake is - the faster it is.
- Every 4 seconds the size of Snake is reduced by 1 block.
- If Snake's length is less than 2 blocks - the game is over.
- When Snake eats one item of food - the timer restarts.
- If Snake hits an edge of game area or one of its own blocks - the game is over.
- After each game the final score is saved and displayed.
- Best Scores screen is a list containing the top 10 results. It saves results between app launch.
- Extra food that gives more points.
Collision is an open-sourced software licensed under the MIT license.