Exemple #1
0
 public bool GetIsRightWay(IXY xy1, IXY xy2)
 {
     if (xy1 == null)
     {
         return(false);
     }
     if (xy2 == null)
     {
         return(false);
     }
     return(Distances[xy1.X, xy1.Y] - Distances[xy2.X, xy2.Y] == 1);
 }
Exemple #2
0
 public static Tuple <bool, bool> GetIsInDangerAndUnderFire(IXY location, Map map, Tank enemy1, Tank enemy2)
 {
     return(GetIsInDangerAndUnderFire(location.X, location.Y, map, enemy1, enemy2));
 }
Exemple #3
0
 public double Distance(IXY xy)
 {
     return((this - new XY(xy.X, xy.Y)).Norm);
 }
Exemple #4
0
 public XY(IXY xy) : this(xy.X, xy.Y)
 {
 }