Пример #1
0
        public void CorrectlyCalculateFavoriteGameMode_WhenAdded()
        {
            var stat = new FavoriteGameMode();

            InitializeStat(stat);
            stat.Add(_matchData2, "player1");
            stat.Get(_dict);
            Assert.AreEqual((string)_dict["favoriteGameMode"], "TM");
        }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = TotalMatchesPlayed;
         hashCode = (hashCode * 397) ^ TotalMatchesWon;
         hashCode = (hashCode * 397) ^ (FavoriteServer?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ UniqueServers;
         hashCode = (hashCode * 397) ^ (FavoriteGameMode?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ AverageScoreboardPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ MaximumMatchesPerDay;
         hashCode = (hashCode * 397) ^ AverageMatchesPerDay.GetHashCode();
         hashCode = (hashCode * 397) ^ LastMatchPlayed.GetHashCode();
         hashCode = (hashCode * 397) ^ KillToDeathRatio.GetHashCode();
         return(hashCode);
     }
 }