Class Statistic


  • @Entity
    public class Statistic
    extends java.lang.Object
    Class Statistic is an entity which contain an information about results of the games with an Algorithm MiniMax.
    Author:
    Arterm Koliushko, https://www.linkedin.com/in/artem-koliushko/
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long algorithmWin
      Field with amount of algorithm wining against a player.
      private long draw
      Field with amount of draws in games player against an algorithm.
      private long id
      Field with an id which statistic has in database.
      private java.lang.String name
      Field with a name of statistic.
      private long playerWin
      Field with amount of player wining against an algorithm.
      static java.lang.String STATISTIC_NAME
      Constant wit a name of statistic.
    • Constructor Summary

      Constructors 
      Constructor Description
      Statistic()  
    • Field Detail

      • name

        private final java.lang.String name
        Field with a name of statistic. Name can't be changed.
        See Also:
        Constant Field Values
      • id

        private long id
        Field with an id which statistic has in database.
      • playerWin

        private long playerWin
        Field with amount of player wining against an algorithm. Default value 0.
      • algorithmWin

        private long algorithmWin
        Field with amount of algorithm wining against a player. Default value 0.
      • draw

        private long draw
        Field with amount of draws in games player against an algorithm. Default value 0.
    • Constructor Detail

      • Statistic

        public Statistic()
    • Method Detail

      • getTotalGames

        public java.lang.Long getTotalGames()
        Method takes playerWin, algorithmWin, draw and return theirs sum.
        Returns:
        Long with a total amount of played games against an algorithm.