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); } }
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)); }