예제 #1
0
 public static bool AreCorresponding(ExtendedWarp warp1, ExtendedWarp warp2)
 {
     if (warp1.OriginLocation == warp2.TargetLocation && warp1.TargetLocation == warp2.OriginLocation)
     {
         if (Math.Abs(warp1.X - warp2.TargetX) + Math.Abs(warp1.Y - warp2.TargetY) < 5)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
 public static int Distance(ExtendedWarp warp1, ExtendedWarp warp2)
 {
     return(Math.Abs(warp1.X - warp2.X) + Math.Abs(warp1.Y - warp2.Y));
 }