Package org.cspoker.common.elements.player

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


    MutableSeatedPlayer winner = pots.getMainPot().getContributors().iterator().next();
   
    BettingRound.logger.info("Winner: " + winner.getName() + " wins " + Util.parseDollars(pots.getTotalValue()));
   
    int gainedChipsValue = pots.getMainPot().getChips().getValue();
    Set<Winner> savedWinner = Collections.singleton(new Winner(winner.getId(), gainedChipsValue));
    pots.getMainPot().getChips().transferAllChipsTo(winner.getStack());
   
    gameMediator.publishWinnerEvent(new WinnerEvent(savedWinner));
  }
View Full Code Here


        PlayerId id = getId(playerChips);
        PlayerState player = getGameState().getPlayer(id);
        if(player!= null && inWinnerZone.get()){
          int prevStack = player.getStack();
          if(prevStack != playerChips.getMoney()){
            dispatch(new WinnerEvent(ImmutableSet.of(new Winner(id,playerChips.getMoney()-prevStack))));
          }
        }

        //refresh state
        player = getGameState().getPlayer(id);
View Full Code Here

TOP

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

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.