Added main game logic