public override bool Equals(object obj) { if (obj.GetType() == typeof(TileForClosedList)) { TileForClosedList objTile = (TileForClosedList)obj; if (objTile.position == this.position && objTile.speed == this.speed && objTile.tileTotalCost == this.tileTotalCost) { return(true); } } return(false); }
private bool checkClosedList(TileForClosedList tileForList) { // for (int i = 0; i < closedlist.Count; i++) { // if (closedlist [i].position == currentPos) { // return true; // } // } if (closedlist.Contains(tileForList)) { return(true); } return(false); }