public void play(GameState state) { while (!state.nextToPlay().human && !state.allDoneWithTurn()) { state.nextToPlay().play(state); state.updateGameState(); } if (state.allDoneWithTurn() || state.playersInHand() < 2) if (progressHand(state.handStep)) { // progresses hand and returns whether hand is over (the last handStep was river) endHand(state); return; } else play(state); if(!state.gameOver) if(state.nextToPlay().human) currentHumanPlayer = (HumanPlayer)state.nextToPlay(); }