refactor GameState.update