Examples of NewRoundEvent


Examples of com.svanloon.game.wizard.client.event.NewRoundEvent

      message = handleHandDealt(event);
    }else if(we instanceof NewGameEvent) {
      NewGameEvent event = (NewGameEvent) we;
      message = handleNewGame(event);
    } else if(we instanceof NewRoundEvent) {
      NewRoundEvent event = (NewRoundEvent) we;
      message = handleNewRound(event);
    } else if(we instanceof NewTrickEvent) {
      NewTrickEvent event = (NewTrickEvent) we;
      message = handleNewTrick(event);
    } else if(we instanceof NewTrumpEvent) {
View Full Code Here

Examples of com.svanloon.game.wizard.client.event.NewRoundEvent

      List<String> playerNames = getPlayerNames(mps);
      List<Integer> ids = getPlayerIds(mps);
      listener.handleNewGame(new NewGameEvent(ids, playerNames));
    } else if(mt.equals(MessageType.NEW_ROUND)) {
      int round = getInt(mps, MessageParamConstants.ROUND);
      listener.handleNewRound(new NewRoundEvent(round));
    } else if(mt.equals(MessageType.NEW_TRICK)) {
      listener.handleNewTrick(new NewTrickEvent());
    } else if(mt.equals(MessageType.NEW_TRUMP)) {
      Card card = getCard(mps);
      listener.handleNewTrump(new NewTrumpEvent(card));
View Full Code Here

Examples of com.svanloon.game.wizard.client.event.NewRoundEvent

    }
    gameEventNotifier.notify(new NewGameEvent(playerIds,playerNames));
    for (int roundId = startRound; roundId < endRound + 1; roundId = roundId + inc) {
      dealer = (dealer + 1)% _playerCollection.size();
      lead = (dealer + 1)% _playerCollection.size();
      gameEventNotifier.notify(new NewRoundEvent(roundId));
      _game.newRound(roundId);
      Round round = _game.getCurrentRound();
      Card trump = dealCards(roundId, dealer, lead);
      gameEventNotifier.notify(new NewTrumpEvent(trump));
      round.setTrump(trump);
View Full Code Here

Examples of org.cspoker.common.api.lobby.holdemtable.event.NewRoundEvent

 
  private static Logger logger = Logger.getLogger(TurnRound.class);
 
  public TurnRound(PokerTable gameMediator, Game game) {
    super(gameMediator, game);
    gameMediator.publishNewRoundEvent(new NewRoundEvent(getRound(), game.getPots().getSnapshot()));
    drawMuckCard();
    drawOpenCardAndPublishCommonCard();
    TurnRound.logger.info("*** TURN *** " + game.getCommunityCards());
    if (getGame().getCurrentPlayer() != null && getGame().getNbCurrentDealPlayers() > 1) {
      gameMediator.publishNextPlayerEvent(new NextPlayerEvent(game.getCurrentPlayer().getId()));
View Full Code Here

Examples of org.cspoker.common.api.lobby.holdemtable.event.NewRoundEvent

  private static Logger logger = Logger.getLogger(FinalRound.class);
 
  public FinalRound(PokerTable gameMediator, Game game) {
    super(gameMediator, game);
   
    gameMediator.publishNewRoundEvent(new NewRoundEvent(getRound(), game.getPots().getSnapshot()));
   
    drawMuckCard();
    drawOpenCardAndPublishCommonCard();
    FinalRound.logger.info("*** RIVER *** " + game.getCommunityCards());
    if (getGame().getCurrentPlayer() != null && getGame().getNbCurrentDealPlayers() > 1) {
View Full Code Here

Examples of org.cspoker.common.api.lobby.holdemtable.event.NewRoundEvent

 
  private static Logger logger = Logger.getLogger(FlopRound.class);
 
  public FlopRound(PokerTable gameMediator, Game game) {
    super(gameMediator, game);
    gameMediator.publishNewRoundEvent(new NewRoundEvent(getRound(), game.getPots().getSnapshot()));
    drawMuckCard();
    drawOpenCard();
    drawOpenCard();
    drawOpenCard();
    EnumSet<Card> cards = EnumSet.noneOf(Card.class);
View Full Code Here

Examples of org.cspoker.common.api.lobby.holdemtable.event.NewRoundEvent

  private boolean bigBlindAllIn = false;
 
  public PreFlopRound(PokerTable gameMediator, Game game) {
    super(gameMediator, game);
   
    gameMediator.publishNewRoundEvent(new NewRoundEvent(getRound(), game.getPots().getSnapshot()));
   
    try {
      // If there are only 2 players, blinds are inverted.
      if (game.getNbCurrentDealPlayers() == 2) {
        game.nextPlayer();
View Full Code Here

Examples of org.cspoker.common.api.lobby.holdemtable.event.NewRoundEvent

    if (nextRound == null) {
      throw new GameEndedException(lastState);
    }
//    List<Pot> pots = Collections.emptyList();
    NewRoundState newRoundState = new NewRoundState(lastState,
        new NewRoundEvent(nextRound, new Pots(lastState
            .getGamePotSize())));
    PlayerState firstToAct = newRoundState
        .getNextActivePlayerAfter(newRoundState.getDealer());
    if (firstToAct == null
        || newRoundState.getNextActivePlayerAfter(firstToAct
View Full Code Here

Examples of org.cspoker.common.api.lobby.holdemtable.event.NewRoundEvent

      }
      if(dealerId == null) throw new IllegalSelectorException();
      blindsDone.set(false);
      endLastRound.set(false);
      dispatch(new NewDealEvent(players, dealerId));
      dispatch(new NewRoundEvent(Round.PREFLOP, new Pots(0)));
    }
View Full Code Here

Examples of org.cspoker.common.api.lobby.holdemtable.event.NewRoundEvent

      }
    }

    @Override
    public void onEndRound(EndRound endRound) {
      dispatch(new NewRoundEvent(getGameState().getRound().getNextRound(),new Pots(getGameState().getGamePotSize())));
    }
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.