This program is a Game called "Snake" (Version 1.1). It is written is C
New In This Update: First of all, The Program prints the Main Menu of the game, in addition to an explanation of the rules of the game.
After the Player has chosen a difficulty for the current game, the board is displayed on the screen for the Player to see. (Including with the Starting Food, and the Snake which is facing to the Right! :) ). At this stage of the game, the Program expects an Input from the Player. Once the Player hits a key (UP / DOWN / RIGHT / LEFT / ESC), The game starts and the Snake starts to move constantly in the direction that it has been instructed to by the Player (In case of an arrow). In case of ESC, The For any other key, the Program does nothing.
The Snake will move in the same direction that was instructed by the Player, Until a new arrow had been hit (with a different direction). If the Snake eats the Food (which is indicated with '$'), It grows by 1 in Size, and a new piece of Food appears on the Screen.
The Goal of the game : "eat" 10 pieces of Food. When the Player succeeds, an appropriate message would be printed on the screen. If the Player (the Snake) had hit itself, or had hit a wall, Or the Player had hit the ESC button on the keyboard, The game will instantly end with a defeat (The Player had Lost). (And an appropriate message will be printed on the screen for the Player).
When a game ends, after the approriate message had been printed, the Program asks the Player whether or not he wants to play again. If the Player inserted 'y', the Main Menu will appear again, and the Player can play the game again. If the Player inserted 'n', the Program will End. Good Luck !!
ASSUMPTIONS: The Player inserts 'y' or 'n' at the end, and a number in the choices at the Main Menu.