Use the arrow keys to move the snake around to eat food! Be careful, if you eat your tail, the game ends.
1) Create a "head" to control. Make the head move at a constant rate, and make it turn left and right when the left and right arrow keys are pressed.
2) Create "food" for your snake to eat. Have the food be created at a constant rate and appear at random points on the screen.
3) Create a scoreboard. Whenever the snake touches a food sprite, have the food sprite disappear, and make the score increase.
4) Make it so that each time the snake eats food, the snake's tail grows longer. Have the snake's tail trail behind the snake.
6) Have the game stop if the snake touches its tail, or if it touches any of the obstacles.
8) Make it so that when the game ends, if you press a button ("R" is used in the demo), the game resets (position, score, and tail).
9) At the start of the game, display how to play the game to the player. Have the game start by pressing a button ("Space" is used in the demo), and have the displayed information stop when the game starts.
Challenge: Make a "difficulty counter." Make it so that if the difficulty increases, the snake moves faster, and if the difficulty decreases, the snake moves slower. Display the difficulty to the player (you may have to adjust the way the snake's tail follows the head to make it work). In the demo, the difficulty is changed when you hit the up or down arrow.