Added most of the game functionality