예제 #1
0
 public void AddInfectedCity(int infectedCity)
 {
     if (InfectedCities.Contains(infectedCity) == false)
     {
         InfectedCities.Add(infectedCity);
     }
 }
예제 #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);
        }