My implementation of the game