コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }