Main game logic implemented