Adding main game logic