Package org.cspoker.client.common.gamestate.modifiers

Examples of org.cspoker.client.common.gamestate.modifiers.NextPlayerState


  @Override
  public GameState getStateAfterAction() {
    GameState betState = getUnwrappedStateAfterAction();
    PlayerState nextToAct = betState.getNextActivePlayerAfter(actor);
    if (nextToAct != null) {
      return new NextPlayerState(betState, new NextPlayerEvent(nextToAct
          .getPlayerId()));
    }
    throw new IllegalStateException("Round can't be over after a bet.");
  }
View Full Code Here


    }

    GameState foldState = getUnwrappedStateAfterAction();

    if (!roundEnds) {
      return new NextPlayerState(foldState, new NextPlayerEvent(foldState
          .getNextActivePlayerAfter(actor).getPlayerId()));
    }
    return getNewRoundState(foldState);
  }
View Full Code Here

  }

  @Override
  public GameState getStateAfterAction() {
    GameState raiseState = getUnwrappedStateAfterAction();
    return new NextPlayerState(raiseState, new NextPlayerEvent(raiseState
        .getNextActivePlayerAfter(actor).getPlayerId()));
  }
View Full Code Here

        || newRoundState.getNextActivePlayerAfter(firstToAct
            .getPlayerId()) == null) {
      // no one/only one left
      return getNewRoundState(newRoundState);
    }
    return new NextPlayerState(newRoundState, new NextPlayerEvent(
        firstToAct.getPlayerId()));
  }
View Full Code Here

          .getNextActivePlayerAfter(actor);
      if (nextActivePlayerAfter == null) {
        // BigBlind is all-in
        return getNewRoundState(state);
      }
      return new NextPlayerState(state, new NextPlayerEvent(
          nextActivePlayerAfter.getPlayerId()));
    }
  }
View Full Code Here

        && gameState.getLargestBet() <= gameState
            .getTableConfiguration().getBigBlind();

    GameState checkState = getUnwrappedStateAfterAction();
    if (!newRound) {
      return new NextPlayerState(checkState, new NextPlayerEvent(
          nextToAct.getPlayerId()));
    }
    return getNewRoundState(checkState);
  }
View Full Code Here

    super.onNewCommunityCards(newCommunityCardsEvent);
  }
 
  @Override
  public void onNextPlayer(NextPlayerEvent nextPlayerEvent) {
    tableState.setGameState(new NextPlayerState(tableState.getGameState(), nextPlayerEvent));
    super.onNextPlayer(nextPlayerEvent);
  }
View Full Code Here

TOP

Related Classes of org.cspoker.client.common.gamestate.modifiers.NextPlayerState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.