Package org.cspoker.client.common.playerstate

Examples of org.cspoker.client.common.playerstate.ForwardingPlayerState


    int buildingRaise = newBetSize - super.getLargestBet();
    if (buildingRaise < 0) {
      buildingRaise = 0;
    }
    raise = buildingRaise;
    this.playerState = new ForwardingPlayerState(player) {
     
      @Override
      public int getBet() {
        return newBetSize;
      }
View Full Code Here


  private final PlayerState playerState;

  public ShowHandState(GameState gameState, ShowHandEvent event) {
    super(gameState);
    this.event = event;
    this.playerState = new ForwardingPlayerState(super.getPlayer(event.getShowdownPlayer().getPlayerId())){
     
      @Override
      public EnumSet<Card> getCards() {
        return ShowHandState.this.event.getShowdownPlayer().getHandCards();
      }
View Full Code Here

      throw new IllegalStateException("Can't bet in the preflop round when you have a deficit to pay.");
   

    final int newStack = oldPlayerState.getStack() - event.getAmount();
    this.newPotSize = super.getRoundPotSize() + event.getAmount();
    this.playerState = new ForwardingPlayerState(oldPlayerState) {

      @Override
      public int getStack() {
        return newStack;
      }
View Full Code Here

    this.event = event;
    final PlayerState oldPlayerState = super.getPlayer(event.getPlayerId());
    this.newBetSize = super.getLargestBet() + event.getAmount();
    final int newStack = oldPlayerState.getStack() - event.getMovedAmount();
    this.newPotSize = super.getRoundPotSize() + event.getMovedAmount();
    playerState = new ForwardingPlayerState(oldPlayerState) {
     
      @Override
      public int getBet() {
        return RaiseState.this.newBetSize;
      }
View Full Code Here

    checkAfterBlindCase = Round.PREFLOP.equals(gameState.getRound());
    if(checkAfterBlindCase && gameState.getDeficit(checkEvent.getPlayerId())>0)
      throw new IllegalStateException("Can't check in the preflop round when you have a deficit to pay.");
    this.newPotSize = super.getRoundPotSize();

    playerState = new ForwardingPlayerState(player){

      @Override
      public boolean hasChecked() {
        //don't mind checkAfterBlindCase because hasChecked isn't used in the preflop round?
        return true;
View Full Code Here

 
  public FoldState(GameState gameState, FoldEvent event) {
    super(gameState);
    this.event = event;
    final PlayerState oldPlayerState = super.getPlayer(event.getPlayerId());
    playerState = new ForwardingPlayerState(oldPlayerState) {
     
      @Override
      public boolean hasFolded() {
        return true;
      }
View Full Code Here

    final int chipsMoved = newBetSize - player.getBet();
    final int newStack = player.getStack() - chipsMoved;
   
    this.newPotSize = super.getRoundPotSize() + chipsMoved;
   
    playerState = new ForwardingPlayerState(player) {
     
      @Override
      public int getBet() {
        return newBetSize;
      }
View Full Code Here

    this.event = event;
    PlayerState oldPlayerState = super.getPlayer(event.getPlayerId());
    final int newStack = oldPlayerState.getStack() - event.getAmount();
    this.newPot = super.getRoundPotSize() + event.getAmount();
   
    playerState = new ForwardingPlayerState(oldPlayerState) {
     
      @Override
      public int getBet() {
        return BlindState.this.event.getAmount();
      }
View Full Code Here

  }
 
 
  @Override
  public PlayerState getPlayer(final PlayerId playerId) {
    return new ForwardingPlayerState(super.getPlayer(playerId)){
      @Override
      public int getBet() {
        return 0;
      }
     
View Full Code Here

 
  public NewPocketCardsState(GameState gameState, PlayerId playerId, NewPocketCardsEvent event) {
    super(gameState);
    this.event = event;
    this.playerId = playerId;
    this.playerState = new ForwardingPlayerState(super.getPlayer(playerId)) {
     
      @Override
      public EnumSet<Card> getCards() {
        return NewPocketCardsState.this.event.getPocketCards();
      }
View Full Code Here

TOP

Related Classes of org.cspoker.client.common.playerstate.ForwardingPlayerState

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.