Examples of NextPlayerState


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

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

    }

    GameState foldState = getUnwrappedStateAfterAction();

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

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

  }

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

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

        || 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

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

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

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

        && 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

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

    super.onNewCommunityCards(newCommunityCardsEvent);
  }
 
  @Override
  public void onNextPlayer(NextPlayerEvent nextPlayerEvent) {
    tableState.setGameState(new NextPlayerState(tableState.getGameState(), nextPlayerEvent));
    super.onNextPlayer(nextPlayerEvent);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.