Package net.royalur.stats
Class GameStatsSummary
java.lang.Object
net.royalur.stats.GameStatsSummary
Combined set of statistics from many games.
-
Constructor Summary
ModifierConstructorDescriptionprotected
GameStatsSummary
(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 TypeMethodDescriptiondouble
getDramaStatistic
(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatistic
about drama for targettarget
.double
getMovesStatistic
(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatistic
about moves for targettarget
.double
getPercentInLeadStatistic
(SummaryStat statistic) Gets the value of the summary statisticstatistic
about percentage in lead.double
getRollsStatistic
(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatistic
about rolls for targettarget
.double
getTurnsInLeadStatistic
(SummaryStat statistic) Gets the value of the summary statisticstatistic
about turns in lead.double
getTurnsStatistic
(GameStatsTarget target, SummaryStat statistic) Gets the value of the summary statisticstatistic
about turns for targettarget
.static GameStatsSummary
Summarises 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 statisticstatistic
about 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
statistic
about rolls for targettarget
.
-
getMovesStatistic
Gets the value of the summary statisticstatistic
about 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
statistic
about moves for targettarget
.
-
getTurnsStatistic
Gets the value of the summary statisticstatistic
about 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
statistic
about turns for targettarget
.
-
getDramaStatistic
Gets the value of the summary statisticstatistic
about 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
statistic
about drama for targettarget
.
-
getTurnsInLeadStatistic
Gets the value of the summary statisticstatistic
about turns in lead.- Parameters:
statistic
- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statistic
about turns in lead.
-
getPercentInLeadStatistic
Gets the value of the summary statisticstatistic
about percentage in lead.- Parameters:
statistic
- The summary statistic to retrieve.- Returns:
- The value of the summary statistic
statistic
about turns in lead.
-
summarise
Summarises the statistics from many games.- Parameters:
stats
- The game statistics to summarise.- Returns:
- The summarised statistics from many games.
-