Tag: game

It’s a snake!

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.

  1. Move the snake (like the etch-a-sketch program)
  2. Detect if you touch its tail (Maze program)
  3. Display objects and keep score (Maze program)

There are lots of solutions, so give it a shot.