Package org.cspoker.common.elements.table

Examples of org.cspoker.common.elements.table.TableId


    displayexecutor = DisplayExecutor.getInstance();
  }

  public void testPlay() throws IllegalActionException, LoginException,
  RemoteException {
    final TableId tableId = new TableId(0);

    int smallBet = 1000;
    int delay = 1500;
   
    User u = new User("Human", "test");
View Full Code Here


    try {
      String tableName = botFactories[botIndex[0]].toString();
      for (int i = 1; i < nbPlayersPerGame; i++) {
        tableName += " vs " + botFactories[botIndex[i]].toString();
      }
      TableId tableId = directorLobby.createHoldemTable(tableName, config).getId();
      int buyIn = nbBigBlindsBuyIn*config.getBigBlind();

      bot[0] = botFactories[botIndex[0]].createBot(botIDs[botIndex[0]], tableId,
          botLobbies[botIndex[0]], buyIn, executor,
          new ReSitInBotListener(this), csvLogger,  /*speedMonitor,*/ gameLimiter /*, kullbackLeibler*/);
 
View Full Code Here

    marschaller.setProperty(Marshaller.JAXB_FRAGMENT, true);

    EventId eid1 = new EventId(42);
    EventId eid2 = new EventId(43);
   
    TableId tid = new TableId(1337);
   
    Queue<DispatchableAction<?>> queue = new LinkedList<DispatchableAction<?>>();
    SitInAnywhereAction action1 = new SitInAnywhereAction(eid1,tid,6500);
    queue.add(action1);
    BetOrRaiseAction action2 = new BetOrRaiseAction(eid2,tid,25);
View Full Code Here

  protected abstract void setServer();

  public void testPlay() throws Exception {
    int seatId = -1;
    final TableId tableId = new TableId(0);

    int smallBlind = 50;
    int buyin = smallBlind * 200;
    int delay = 2000;
    for (User u : users) {
View Full Code Here

                public void mouseDoubleClick(MouseEvent evt) {
                  logger.info("Opening table");
                  TableItem[] selectedItems = availableGameTables.getSelection();
                  if (selectedItems.length == 1) {
                    // Open selected table
                    TableId tid = new TableId(Long.parseLong(selectedItems[0].getText(1)));

                    final GameWindow w = getClientCore().getGui().getGameWindow(tid, true);
                    getDisplay().asyncExec(new Runnable() {

                      public void run() {
View Full Code Here

   *             reason
   */
  public void joinTable(RemoteLobbyContext lobbyContext) {
    assert (lobbyContext != null);
    try {
      tableContext = lobbyContext.joinHoldemTable(new TableId(0), new AsynchronousHoldemTableListener(
          displayExecutor, listener));
    } catch (RemoteException e) {
      throw new IllegalStateException(e);
    } catch (IllegalActionException e) {
      logger.warn("You cannot join the desired table", e);
View Full Code Here

  @Override
  public void setUp(){
    events = new EventSequenceChecker();
    TableConfiguration configuration = new TableConfiguration();
    table = new ServerTable(configuration);
    pokerTable = new PokerTable(new TableId(0), "table", configuration, new ExtendedAccountContext(){

      public void changePassword(String passwordHash) {

      }
View Full Code Here

    RemoteServerContext conn = server.login("foobar", "foobar");
    SmartClientContext clientContext = new SmartClientContext(conn);
    final SmartLobbyContext lobbyContext = clientContext.getLobbyContext(new DefaultLobbyListener());
    final PlayerId botId = clientContext.getAccountContext().getPlayerID();
    final SingleThreadRequestExecutor executor = SingleThreadRequestExecutor.getInstance();
    final TableId tableId = new TableId(0);
    bot = botFactory.createBot(botId, tableId, lobbyContext, 200000, executor, new DefaultBotListener() {
      @Override
      public void onSitOut(SitOutEvent sitOutEvent) {
        if(botId.equals(sitOutEvent.getPlayerId())){
          logger.info("Sitting in again after "+sitOutEvent);
View Full Code Here

  }
 
  public DetailedHoldemTable createTable(ExtendedAccountContext accountContext, String name,
      TableConfiguration configuration) {
    TableId tableId = new TableId(counter.getAndIncrement());
    PokerTable table = new PokerTable(tableId, name, configuration, accountContext);
    tables.put(tableId, table);
   
    for (LobbyListener listener : lobbyListeners) {
      listener.onTableCreated(new TableCreatedEvent(accountContext.getPlayer().getMemento(), new Table(tableId, name)));
View Full Code Here

    PokerTable table = tables.get(tableId);
    return table.joinTable(accountContext.getPlayer(), holdemTableListener);
  }
 
  public void removeTable(long tableId) {
    PokerTable table = tables.get(new TableId(tableId));
   
    if (table != null && table.isEmpty()) {
      tables.remove(new TableId(tableId));
      Table tableInfo = table.getShortTableInformation();
      table.terminate();
      for (LobbyListener listener : lobbyListeners) {
        listener.onTableRemoved(new TableRemovedEvent(tableInfo));
      }
View Full Code Here

TOP

Related Classes of org.cspoker.common.elements.table.TableId

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.