Package org.cspoker.common.api.lobby.holdemtable.event

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


    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


   
    drawMuckCard();
    drawOpenCardAndPublishCommonCard();
    FinalRound.logger.info("*** RIVER *** " + game.getCommunityCards());
    if (getGame().getCurrentPlayer() != null && getGame().getNbCurrentDealPlayers() > 1) {
      gameMediator.publishNextPlayerEvent(new NextPlayerEvent(game.getCurrentPlayer().getId()));
    }
  }
View Full Code Here

    EnumSet<Card> cards = EnumSet.noneOf(Card.class);
    cards.addAll(getGame().getCommunityCards());
    gameMediator.publishNewCommonCardsEvent(new NewCommunityCardsEvent(cards));
    FlopRound.logger.info("*** FLOP *** " + game.getCommunityCards());
    if (getGame().getCurrentPlayer() != null && getGame().getNbCurrentDealPlayers() > 1) {
      gameMediator.publishNextPlayerEvent(new NextPlayerEvent(game.getCurrentPlayer().getId()));
    }
   
  }
View Full Code Here

          .getPocketCards())));
    }
   
    if (game.getCurrentPlayer() != null && getGame().getNbCurrentDealPlayers() > 1
        || !onlyOnePlayerLeftBesidesAllInPlayersAndCalled()) {
      gameMediator.publishNextPlayerEvent(new NextPlayerEvent(game.getCurrentPlayer().getId()));
    }
  }
View Full Code Here

  @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

    }

    GameState foldState = getUnwrappedStateAfterAction();

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

  }

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

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

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

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

TOP

Related Classes of org.cspoker.common.api.lobby.holdemtable.event.NextPlayerEvent

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.