somewhat better state-machine system for the game state