Improved game logic