Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Cells != null ? Cells.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Squares?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Timeline?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Stats?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (JeweledCells?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
 public bool Equals(Playfield other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(GetEnumeratorCells().SequenceEqual(other.GetEnumeratorCells()) &&
            GetEnumeratorSquares().SequenceEqual(other.GetEnumeratorSquares()) &&
            Equals(Timeline, other.Timeline) && Equals(Stats, other.Stats) &&
            JeweledCells.SequenceEqual(other.JeweledCells));
 }