Package org.cspoker.common.api.shared.exception

Examples of org.cspoker.common.api.shared.exception.IllegalActionException


    try {
      conn.sendRemote(new TablePicker(serial, true));
      tableInfoObtained.await();
      conn.sendRemote(new SitOut(serial, game_id));
    } catch (JSONException e) {
      throw new IllegalActionException(e.getMessage());
    } catch (InterruptedException e) {
      throw new IllegalStateException(e);
    }
  }
View Full Code Here


  @Override
  public RemoteHoldemPlayerContext sitIn(int buyIn,
      HoldemPlayerListener holdemPlayerListener)
  throws IllegalActionException, RemoteException {
    if(psPlayerContext!=null) throw new IllegalActionException("Can't sit in twice");
    psPlayerContext = new PSPlayerContext(conn, serial, this, holdemPlayerListener, gameState, buyIn);
    return psPlayerContext;
  }
View Full Code Here

    table.stopPlaying(player);
  }

  @Override
  public void reSitIn() throws IllegalActionException {
    throw new IllegalActionException("Unsupported Operation");
  }
View Full Code Here

      ExtendedAccountContext accountContext)
      throws IllegalActionException {
    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

      throw new IllegalArgumentException(
      "The given player should be valid.");
    }

    if (hasAsPlayer(player)) {
      throw new IllegalActionException(player
          + " is already seated at this table.");
    }

    if(!tableConfiguration.isDoylesGame()){
      if (player.getStack().getValue() == 0 ) {
View Full Code Here

      throws SeatTakenException, IllegalActionException {
    if (seatId == null) {
      try {
        seatId = table.addPlayer(player);
      } catch (PlayerListFullException e) {
        throw new IllegalActionException(e.getMessage(), e);
      }
    }else{
      table.addPlayer(seatId, player);
    }
   
View Full Code Here

  }
 
  public void sitOut(MutableSeatedPlayer player, boolean forced)
      throws IllegalActionException {
    if (!table.hasAsPlayer(player)) {
      throw new IllegalActionException(player.getName() + " is not seated at this table.");
    }
    if ((getNextDealer() == null) || getNextDealer().equals(player)) {
      setNextDealer(initialCurrentHandPlayers.getNextTo(player));
    }
    if ((getDealer() == null) || getDealer().equals(player)) {
View Full Code Here

TOP

Related Classes of org.cspoker.common.api.shared.exception.IllegalActionException

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.