Adding the game logic