implement game state