Пример #1
0
 public void AddCityThatCausedOutbreak(int cityThatCausedOutbreak)
 {
     if (CitiesThatHaveCausedOutbreaks.Contains(cityThatCausedOutbreak) == false)
     {
         CitiesThatHaveCausedOutbreaks.Add(cityThatCausedOutbreak);
     }
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 17;

            hash = (hash * 31) + (HappenedDuringGameSetup == true ? 1 : 0);
            hash = (hash * 31) + PlayerWhoAppliesInfection.GetHashCode();
            hash = (hash * 31) + InitialCity.GetHashCode();
            hash = (hash * 31) + InfectionType;
            hash = (hash * 31) + InitialNumberOfCubes;
            hash = (hash * 31) + InfectedCities.Custom_HashCode();
            hash = (hash * 31) + InfectionsPrevented_ByMedic.Custom_HashCode();
            hash = (hash * 31) + CitiesThatHaveCausedOutbreaks.Custom_HashCode();
            hash = (hash * 31) + NumberOfInfectionCubesUsed;
            hash = (hash * 31) + FailureReason.GetHashCode();

            return(hash);
        }