diff --git a/isometric-park-fna/Tile.cs b/isometric-park-fna/Tile.cs --- a/isometric-park-fna/Tile.cs +++ b/isometric-park-fna/Tile.cs @@ -21,11 +21,16 @@ return !(left == right); } - public bool Equals(Object other) { + public override bool Equals(Object other) { return ((other != null) && ! this.GetType().Equals(other.GetType()) && this == (Edge)other); //we just confirmed the types match so this is okay - } + } + + public override int GetHashCode() { + // return HashCode.Combine(Start, End); + return (Start, End).GetHashCode(); + } } public class Tile