@Override
public void enterNode(final Pair<ActionWrapper,GameTreeNode> pair, final double lowerBound) {
display.syncExec(new Runnable() {
public void run() {
ActionWrapper action = pair.getLeft();
TreeItem item = items.peek();
TreeItem newItem;
if (item == null) {
if (newDecision.compareAndSet(true, false)) {
tree.removeAll();
}
newItem = new TreeItem(tree, SWT.NONE);
} else {
newItem = new TreeItem(item, SWT.NONE);
}
ProbabilityAction probAction;
String samples = "?";
if (action instanceof ProbabilityAction) {
probAction = (ProbabilityAction) action;
} 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)