Control the snake to eat fruits and avoid obstacles and its own body.
The snake will grow longer when it eats a fruit.
The more fruits the snake eats, the higher score you will receive.
The gaps on the border let the snake wrap around to other side of the screen.
Add obstacles inside the map.
Add gaps on the border that lets the snake wrap around to other side of the screen.
Use "make run" to compile and run snake.cpp
Or use "make" to compile snake.cpp, and use "./snake" to run the game.
"./snake xx"
Use 1 parameter to input frame-rate(in range of [1, 100]), and the default game speed is 5.
"./snake xx xx"
Use 2 parameters to input frame-rate and game speed.
First one should be frame-rate(in range of [1, 100]).
Second one should be game speed(in range of [1, 10]).
Press k/K to start the game at the splash screen.
Use w/W/a/A/s/S/d/D or arrows keys to control the direction of the snake.
Use r/R to restart.
Use p/P to pause.
Use q/Q to quit the game.
macOS High Sierra version 10.13.4
gcc (MacPorts gcc5 5.5.0_1) 5.5.0
Sublime 3.1.1 (BUILD 3176)