Examples of BetEvent


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

    raiseBetWith(amount);
    getBettingRules().setBetPlaced(true);
    getBettingRules().setLastBetAmount(amount);
    playerMadeEvent(player);
    game.nextPlayer();
    gameMediator.publishBetEvent(new BetEvent(player.getId(), amount));
    BettingRound.logger.info(player.getName() + " bets " + Util.parseDollars(amount) + ".");
  }
View Full Code Here

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

    HTTPResponse response = new HTTPResponse();
    response.addActionResult(new ActionPerformedEvent<Void>(action1,null));
    response.addActionResult(new ActionPerformedEvent<Void>(action2,null));
   
    Queue<ServerEvent> equeue = new LinkedList<ServerEvent>();
    equeue.add(new HoldemTableTreeEventWrapper(tid, new BetEvent(new PlayerId(5),25)));
    response.addEvents(equeue);
   
    marschaller.marshal(response, output);

    output = new File(baseDir,"http.xml");
View Full Code Here

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

    GameState betState;
    int stack = gameState.getPlayer(actor).getStack();
    if (stack == amount) {
      betState = new AllInState(gameState, new AllInEvent(actor, amount));
    } else if (stack > amount) {
      betState = new BetState(gameState, new BetEvent(actor, amount));
    } else throw new IllegalStateException("Can't bet amount: "+amount+", with stack: " + stack);
    return betState;
  }
View Full Code Here

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

      int movedAmount = raise.getAmount();
      int callValue = getGameState().getCallValue(id);
      if(movedAmount == getGameState().getPlayer(id).getStack())
        dispatch(new AllInEvent(id, movedAmount));
      else if(callValue == 0)
        dispatch(new BetEvent(id, movedAmount));
      else
        dispatch(new RaiseEvent(id, movedAmount-callValue, movedAmount));
    }
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.