Package org.cspoker.common.elements.table

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


  public abstract GameState getStateAfterAction() throws GameEndedException,
      DefaultWinnerException;

  protected GameState getNewRoundState(GameState lastState)
      throws GameEndedException {
    Round nextRound = lastState.getRound().getNextRound();
    if (nextRound == null) {
      throw new GameEndedException(lastState);
    }
//    List<Pot> pots = Collections.emptyList();
    NewRoundState newRoundState = new NewRoundState(lastState,
View Full Code Here


    });
  }

  private void visitNode(INode node, final TreeItem previous) {
    InnerNode parent = node.getParent();
    final Round round = parent==null?startRound:parent.gameState.getRound();
    final ProbabilityAction action = node.getLastAction();
    final String actor = action.getAction().actor.equals(botId)?"Bot":"Player "+action.getAction().actor;
    final TreeItemHolder holder = new TreeItemHolder();
    final int nbSamples = node.getNbSamples();
    final double average = node.getEV();
    String stddev;
    try {
      stddev = ""+Util.parseDollars(node.getStdDev());
    } catch (UnsupportedOperationException e) {
      stddev = "?";
    }
    final String stddevf = stddev;
    String nbSamplesInMean;
    try {
      nbSamplesInMean = node.getNbSamplesInMean()+"";
    } catch (UnsupportedOperationException e) {
      nbSamplesInMean = "?";
    }
    final String nbSamplesInMeanf = nbSamplesInMean;
    final double evStadDev = node.getEVStdDev();
    display.syncExec(new Runnable(){
      @Override
      public void run() {
        TreeItem newItem = previous==null? new TreeItem(tree, SWT.NONE):new TreeItem(previous, SWT.NONE);
        holder.item = newItem;
        newItem.setText(new String[] { actor,
            action.getAction().toString(),
            round.getName(),
            Math.round(100 * action.getProbability()) + "%",
            ""+nbSamples,
            ""+Util.parseDollars(average - relStackSize),
            stddevf,
            nbSamplesInMeanf,
View Full Code Here

        } else {
          throw new IllegalStateException("What action is this? "
              + action);
        }
        GameTreeNode node = pair.getRight();
        Round round = rounds.peek();
        rounds.push(node.getGameState().getRound());
        String actor = action.getAction().actor.equals(botId)?"Bot":"Player "+action.getAction().actor;
        newItem.setText(new String[] { actor,
            action.getAction().toString(), round.getName(),
            Math.round(100 * probAction.getProbability()) + "%",
            samples, "?", "?", "" + node.getNbTokens() ,
            ""+Util.parseDollars(node.getUpperWinBound() - relStackSize),
            ""+Util.parseDollars(node.getGameState().getGamePotSize()),
            ""+Util.parseDollars(lowerBound - relStackSize)
View Full Code Here

TOP

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

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.