CampaignClient.getInstance().getDiceRoller()
.addPropertyChangeListener(new DiceListener() {
@Override
public void diceRolled(Dice dices) {
DiceCountVisitor visitor = new DiceCountVisitor();
dices.visit(visitor);
for (Integer dice : visitor.getDices()) {
List<Integer> results = visitor.getResults(dice);
Integer total = 0;
for (Integer res : results) {
total += res;
}
Integer mod = visitor.getModifier();
total += mod;
allMessage.add(new PanelDice(maxWidth, total, dice,
mod, results));
}