game logic for changing state.