Class GameStatsSummary

java.lang.Object
net.royalur.stats.GameStatsSummary

public class GameStatsSummary extends Object
Combined set of 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 of GameStatsTarget, and the second dimension is indexed by the ordinal of an element of SummaryStat.
      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 of GameStatsTarget, and the second dimension is indexed by the ordinal of an element of SummaryStat.
      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 of GameStatsTarget, and the second dimension is indexed by the ordinal of an element of SummaryStat.
      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 of GameStatsTarget, and the second dimension is indexed by the ordinal of an element of SummaryStat.
      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 of SummaryStat.
      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 of SummaryStat.
  • Method Details

    • getRollsStatistic

      public double getRollsStatistic(GameStatsTarget target, SummaryStat statistic)
      Gets the value of the summary statistic statistic about rolls for target target.
      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 target target.
    • getMovesStatistic

      public double getMovesStatistic(GameStatsTarget target, SummaryStat statistic)
      Gets the value of the summary statistic statistic about moves for target target.
      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 target target.
    • getTurnsStatistic

      public double getTurnsStatistic(GameStatsTarget target, SummaryStat statistic)
      Gets the value of the summary statistic statistic about turns for target target.
      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 target target.
    • getDramaStatistic

      public double getDramaStatistic(GameStatsTarget target, SummaryStat statistic)
      Gets the value of the summary statistic statistic about drama for target target.
      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 target target.
    • getTurnsInLeadStatistic

      public double getTurnsInLeadStatistic(SummaryStat statistic)
      Gets the value of the summary statistic statistic about turns in lead.
      Parameters:
      statistic - The summary statistic to retrieve.
      Returns:
      The value of the summary statistic statistic about turns in lead.
    • getPercentInLeadStatistic

      public double getPercentInLeadStatistic(SummaryStat statistic)
      Gets the value of the summary statistic statistic about percentage in lead.
      Parameters:
      statistic - The summary statistic to retrieve.
      Returns:
      The value of the summary statistic statistic about turns in lead.
    • summarise

      public static GameStatsSummary summarise(GameStats... stats)
      Summarises the statistics from many games.
      Parameters:
      stats - The game statistics to summarise.
      Returns:
      The summarised statistics from many games.