Package net.royalur.stats
Class GameStatsSummary
java.lang.Object
net.royalur.stats.GameStatsSummary
Combined set of statistics from many games.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGameStatsSummary(double[][] rolls, double[][] moves, double[][] turns, double[][] drama, double[] turnsInLead, double[] percentInLead) Instantiates a summary of the statistics from several games. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDramaStatistic(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatisticabout drama for targettarget.doublegetMovesStatistic(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatisticabout moves for targettarget.doublegetPercentInLeadStatistic(SummaryStat statistic) Gets the value of the summary statisticstatisticabout percentage in lead.doublegetRollsStatistic(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatisticabout rolls for targettarget.doublegetTurnsInLeadStatistic(SummaryStat statistic) Gets the value of the summary statisticstatisticabout turns in lead.doublegetTurnsStatistic(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatisticabout turns for targettarget.static GameStatsSummarySummarises the statistics from many games.
-
Constructor Details
-
GameStatsSummary
protected GameStatsSummary(double[][] rolls, double[][] moves, double[][] turns, double[][] drama, double[] turnsInLead, double[] percentInLead) Instantiates a summary of the statistics from several games.- Parameters:
rolls- Statistics about the number of rolls performed in the summarised games. The first dimension of this array is indexed by the ordinal of an element ofGameStatsTarget, and the second dimension is indexed by the ordinal of an element ofSummaryStat.moves- Statistics about the number of moves made in the summarised games. The first dimension of this array is indexed by the ordinal of an element ofGameStatsTarget, and the second dimension is indexed by the ordinal of an element ofSummaryStat.turns- Statistics about the number of turns made in the summarised games. The first dimension of this array is indexed by the ordinal of an element ofGameStatsTarget, and the second dimension is indexed by the ordinal of an element ofSummaryStat.drama- Statistics about the count of drama made in the summarised games. The first dimension of this array is indexed by the ordinal of an element ofGameStatsTarget, and the second dimension is indexed by the ordinal of an element ofSummaryStat.turnsInLead- Statistics about the number of turns that the winner held the lead in a game before winning. This array is indexed by the ordinal of an element ofSummaryStat.percentInLead- Statistics about the percentage of turns that the winner held the lead in a game before winning. This array is indexed by the ordinal of an element ofSummaryStat.
-
-
Method Details
-
getRollsStatistic
Gets the value of the summary statisticstatisticabout rolls for targettarget.- Parameters:
target- The target to retrieve the summary statistic about.statistic- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statisticabout rolls for targettarget.
-
getMovesStatistic
Gets the value of the summary statisticstatisticabout moves for targettarget.- Parameters:
target- The target to retrieve the summary statistic about.statistic- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statisticabout moves for targettarget.
-
getTurnsStatistic
Gets the value of the summary statisticstatisticabout turns for targettarget.- Parameters:
target- The target to retrieve the summary statistic about.statistic- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statisticabout turns for targettarget.
-
getDramaStatistic
Gets the value of the summary statisticstatisticabout drama for targettarget.- Parameters:
target- The target to retrieve the summary statistic about.statistic- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statisticabout drama for targettarget.
-
getTurnsInLeadStatistic
Gets the value of the summary statisticstatisticabout turns in lead.- Parameters:
statistic- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statisticabout turns in lead.
-
getPercentInLeadStatistic
Gets the value of the summary statisticstatisticabout percentage in lead.- Parameters:
statistic- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statisticabout turns in lead.
-
summarise
Summarises the statistics from many games.- Parameters:
stats- The game statistics to summarise.- Returns:
- The summarised statistics from many games.
-