Write some game logic.

Not tested.