Implementation of the game, as was demoed on lecture 3.