CIT 597 Assignment 2: TurnBlue
Fall 2008, David Matuszek

"TurnBlue" is a puzzle game, based on a much older computer game whose name I have forgotten. I have chosen this game because the programming logic is simple, and should not itself be any challenge; thus, almost all of the difficulties you encounter (and they may be considerable) will be in learning to use a new programming language.

Purposes of this assignment:

General idea of the assignment:

"TurnBlue" is a puzzle game, based on a much older computer game whose name I have forgotten.

The player is presented with an 8x8 grid of squares, some of which are red, and the others blue. By clicking on various squares, the player tries to make all the squares blue.

The logic is simple. When the user clicks a square, up to five squares change color (red to blue, or blue to red): the square clicked on, the squares directly above and below the clicked square, and the squares directly to the left and right of the clicked square. If the clicked square is on a border or in a corner, fewer than five squares will change color.

In this version, the play proceeds in levels. At the first (dead simple) level, the player has to click one square; at the second level, two squares; and so on, up to a maximum of 32 squares. So that there is a definite end to the game, if the player clicks five times more than is required by a level, the game is over.

How to create the puzzle

To create a puzzle at level N, begin with a board that is entirely red. Then simulate N clicks on the board in randomly chosen squares, taking care never to click a given square more than once. Finally, present the board to the player.

Programming requirements


Use XHTML 1.1 with CSS.

Due date:

Sunday, September 21 Tuesday, September 23, by midnight.