# Turnablock

A game invented by mathematician John Conway

## Rules

The game is very simple. You and the computer take turns flipping rectangles: cloud squares turn to wood and vice versa. Whoever first turns the whole board to wood (the target) is the winner. The only condition is that the lower right corner of the rectangle must be cloud (the base).

## Play

Click on a cloud then drag to specify your rectangle to flip. Note: the square that you click will be the lower right corner of your rectangle. You can change the size of the board from 3x3 to 8x8. You can also select an easy or hard opponent. Click restart to start the game over.

This game, invented by John Conway, was described in the Mathematical Games column of Scientific American.

The winning strategy is described there, and is related to the winning strategy for the game of Nim.

The player who goes first (i.e. you) can force a win by playing properly except for boards of size 3x4, 3x8, 4x7, and 7x8, for which the second player can force a win.

The hard setting implements the winning strategy, while the easy setting just tries to avoid making boneheaded moves.

Also, note that the game is guaranteed to eventually end; you can't flip forever.