Package org.cspoker.common.elements.player

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


 
  protected void goAllIn(MutableSeatedPlayer player) {
    int amount = player.getStack().getValue();
    player.transferAllChipsToBetPile();
   
    allInPlayers.add(new MutableAllInPlayer(player));
    getGame().removePlayerFromCurrentDeal(player);
    if (player.getBetChips().getValue() > getBet()) {
      if(getBet()>0){
        getBettingRules().incrementNBRaises();
      }
View Full Code Here


      Collection<Chips> betsFromFoldedPlayers) {
    Collections.sort(allInPlayers);
    LinkedList<MutableAllInPlayer> allInPlayersQueue = new LinkedList<MutableAllInPlayer>(allInPlayers);
   
    while (!allInPlayersQueue.isEmpty()) {
      MutableAllInPlayer allInPlayer = allInPlayersQueue.poll();
      MutablePot currentPot = pots.element();
     
      if (allInPlayer.getBetValue() > 0) {
        pots.addFirst(currentPot.createPot());
        currentPot.collectChips(allInPlayer.getBetValue());
       
        for (Chips c : betsFromFoldedPlayers) {
          if (c.getValue() > allInPlayer.getBetValue()) {
            c.transferAmountTo(allInPlayer.getBetValue(), currentPot.getChips());
          } else {
            c.transferAllChipsTo(currentPot.getChips());
            betsFromFoldedPlayers.remove(c);
          }
        }
      }
      pots.element().removeContributor(allInPlayer.getPlayer());
    }
    if (pots.element().getNbContributors() == 0) {
      pots.removeFirst();
    }
  }
View Full Code Here

TOP

Related Classes of org.cspoker.common.elements.player.MutableAllInPlayer

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.