Search in sources :

Example 1 with IRandomStats

use of games.strategy.engine.random.IRandomStats 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);
}
Also used : JScrollPane(javax.swing.JScrollPane) RandomStatsDetails(games.strategy.engine.random.RandomStatsDetails) IRandomStats(games.strategy.engine.random.IRandomStats)

Aggregations

IRandomStats (games.strategy.engine.random.IRandomStats)1 RandomStatsDetails (games.strategy.engine.random.RandomStatsDetails)1 JScrollPane (javax.swing.JScrollPane)1