public StatisticManager(StatisticManager statisticManager)
 {
     WhiteArmyStatistics = new Statistics()
     {
         NumberOfWins = WhiteArmyStatistics.NumberOfWins
     };
     BlackArmyStatistics = new Statistics()
     {
         NumberOfWins = BlackArmyStatistics.NumberOfWins
     };
     GameSessionStatistic = new GameSessionStatistic();
 }
Example #2
0
 public void Startbattle()
 {
     IsGameAlive      = true;
     StatisticManager = new StatisticManager(StatisticManager);
     StatisticManager.WriteStartingDataForStatistic();
     while (true)
     {
         MakeATurn(AlgorithmContainer.AlgorithmWhite, TypesOfObject.UnitWhite, StatisticManager.WhiteArmyStatistics);
         StatisticManager.WhiteArmyStatistics.TurnNumber++;
         if (!IsGameAlive)
         {
             StatisticManager.WriteEndingDataForStatistic(MapManager.CheckForGameOver());
             return;
         }
         MakeATurn(AlgorithmContainer.AlgorithmBlack, TypesOfObject.UnitBlack, StatisticManager.BlackArmyStatistics);
         StatisticManager.BlackArmyStatistics.TurnNumber++;
         if (!IsGameAlive)
         {
             StatisticManager.WriteEndingDataForStatistic(MapManager.CheckForGameOver());
             return;
         }
         Thread.Sleep(WaitTime);
     }
 }
Example #3
0
 public Engine()
 {
     MapManager       = new MapManager(GameSessionManager.Map);
     StatisticManager = new StatisticManager();
 }