Improved game logic and exception handling