This project consists of designing and building a computer program in C++ that allows a player to play a snake-food-eating game.
About the Game:
In this game, the player uses the arrow keys to move a "snake" around the board. As the snake finds food, it eats the food and grows larger. The game ends when the snake either crashes into itself or touches the screen. The goal is to make the snake as big as possible before it ends. The player will have 3 lives.
Firstly, the game will ask you to press any key to continue then show you the set of instructions (rule) to continue to play the game again you have to press any key and if you wish not to play you can click ESC. After this, your screen will show loading with a growing bar, after it stops press any key. Now you are ready to play the game. The game ends when the snake either crashes itself or touches the box. A message will display and then asked you to enter any key to quit. You can now view, your scores by entering your name and also see past records by pressing 'y'.
1. You will be provided food (F) at the several coordinates of the screen which you have to eat. Every time you eat food the length of the snake will be increased by 1 element and thus the score.
[NOTE: Your life will decrease as you hit the wall or snake's body.]
2. You can pause the game in its middle by pressing any key. To continue the paused game press any other key once again.
3. If you want to exit press ESC.
Submitted by Sakshi Maurya (sakshimaurya2903)
Download packets of source code on Coders Packet