public bool Equals(EightPuzzleState other) { if (ReferenceEquals(null, other)) { return false; } if (ReferenceEquals(this, other)) { return true; } for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (other.Fields[i, j] != Fields[i, j]) { return false; } } } return true; }
public bool Equals(EightPuzzleState other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (other.Fields[i, j] != Fields[i, j]) { return(false); } } } return(true); }