use of games.strategy.engine.random.RandomStatsDetails in project triplea by triplea-game.
the class HistoryLog method printDiceStatistics.
public void printDiceStatistics(final GameData data, final IRandomStats randomStats) {
final PrintWriter logWriter = printWriter;
final RandomStatsDetails stats = randomStats.getRandomStats(data.getDiceSides());
final String diceStats = stats.getAllStatsString();
if (diceStats.length() > 0) {
logWriter.println(diceStats);
logWriter.println();
logWriter.println();
}
textArea.setText(stringWriter.toString());
}
use of games.strategy.engine.random.RandomStatsDetails in project triplea by triplea-game.
the class GameMenu method addShowDiceStats.
private void addShowDiceStats() {
add(SwingAction.of("Show Dice Stats", e -> {
final IRandomStats randomStats = (IRandomStats) game.getRemoteMessenger().getRemote(IRandomStats.RANDOM_STATS_REMOTE_NAME);
final RandomStatsDetails stats = randomStats.getRandomStats(gameData.getDiceSides());
JOptionPane.showMessageDialog(frame, new JScrollPane(stats.getAllStats()), "Random Stats", JOptionPane.INFORMATION_MESSAGE);
})).setMnemonic(KeyEvent.VK_D);
}
Aggregations