Package org.cspoker.server.embedded.gamecontrol

Examples of org.cspoker.server.embedded.gamecontrol.PokerTable


  @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


  }
 
  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)));
    }
   
    return table.getTableInformation();
  }
View Full Code Here

   
    return table.getTableInformation();
  }
 
  public DetailedHoldemTable getTableInformation(TableId tableId) {
    PokerTable table = tables.get(tableId);
    return table != null ? table.getTableInformation() : null;
  }
View Full Code Here

    if (holdemTableListener == null)
      throw new IllegalArgumentException("The given holdem table listener is not effective.");
    if (!tables.containsKey(tableId)) {
      throw new IllegalActionException("The provided table #" + tableId + " to join does not exist.");
    }
    PokerTable table = tables.get(tableId);
    return table.joinTable(accountContext.getPlayer(), holdemTableListener);
  }
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.server.embedded.gamecontrol.PokerTable

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.