A simple snake game implemented using C++
The player controls a snake that moves around the screen, trying to eat fruit and avoid colliding with walls or its own tail.
RULES OF THE GAME:
-
Don’t hit a wall and don’t bite your own tail.
-
Crashing into a wall or your tail will end the game immediately.
-
10 points will be added to the player’s score for eating the fruit (@).
-
The player’s total score is calculated based on the number of fruits the snake consumed.
-
The length of the snake will be increased after eating the fruits.
-
Use w, a, s, d to move the snake UP, LEFT, DOWN, and RIGHT, respectively.