public override bool Equals(object obj) { //Check for null and compare run-time types. if ((obj == null) || GetType() == obj.GetType()) { return(false); } var other = (GameState)obj; if (IsAwaitingSubGameWinner != other.IsAwaitingSubGameWinner) { return(false); } if (Decks.Count != other.Decks.Count) { return(false); } return(!Decks.Any(deck => other.Decks.Contains(deck))); }