Today’s task was create a game like Snake. The snake would draw a line as it moved around the screen. Objects to be collected would appear at random places. If the snake touched it’s tail it would lose a life.
We broke down this task as a class into the following manageable pieces.
- Move the snake (like the etch-a-sketch program)
- Detect if you touch its tail (Maze program)
- Display objects and keep score (Maze program)
There are lots of solutions, so give it a shot.