Examples of PlayerId


Examples of org.cspoker.common.elements.player.PlayerId

  }

  public final int getUpperRaiseBound(PlayerId playerId) {
    PlayerState player = getPlayer(playerId);
    PlayerState tempPlayer;
    PlayerId tempId = playerId;
    int maxOtherBettableChips=0;
    loop: do{
      //TODO fix infinite loop on double BB
      tempPlayer = getNextActivePlayerAfter(tempId);
      if(tempPlayer==null){
View Full Code Here

Examples of org.cspoker.common.elements.player.PlayerId

  public final PlayerState getNextSeatedPlayerAfter(PlayerId startPlayer) { 
    ImmutableBiMap<SeatId, PlayerId> seatMap = getSeatMap()
    int maxNbPlayers = getTableConfiguration().getMaxNbPlayers();
    SeatId currentSeat = seatMap.inverse().get(startPlayer);
    PlayerId currentPlayer;
    do{
      currentSeat = new SeatId((currentSeat.getId() + 1) % maxNbPlayers);
      currentPlayer = seatMap.get(currentSeat);
    } while(currentPlayer == null);
    if(currentPlayer.equals(startPlayer)){
      return null;
    }
    return getPlayer(currentPlayer);
  }
View Full Code Here

Examples of org.cspoker.common.elements.player.PlayerId

    return getPlayer(currentPlayer);
  }

  public final PlayerState getNextActivePlayerAfter(PlayerId startPlayerId) { 
    PlayerState currentPlayer;
    PlayerId currentPlayerId = startPlayerId;
    do{
      currentPlayer = getNextSeatedPlayerAfter(currentPlayerId);
      if(currentPlayer==null){
        return null;
      }
      currentPlayerId = currentPlayer.getPlayerId();
      if(currentPlayerId.equals(startPlayerId)){
        return null;
      }
    }while(!currentPlayer.isActivelyPlaying());
    return currentPlayer;
  }
View Full Code Here

Examples of org.cspoker.common.elements.player.PlayerId

    });
  }

  @Override
  public AccountContext getAccountContext() {
    return new PSAccountContext(new PlayerId(serial));
  }
View Full Code Here

Examples of org.cspoker.common.elements.player.PlayerId

   * This method is thread-safe.
   *
   * @return A unique player id.
   */
  private PlayerId getUniquePlayerId() {
    return new PlayerId(counter.getAndIncrement());
  }
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.