Rework game logic.

Fixes #19.
Reworks the game logic according to issue #19. The code is SO MUCH
SEXIER NOW.