Make game logic object oriented

Fixes #14.
Makes the game logic somewhat "object oriented" by putting all the
functionality in a class called "Game".