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); }
public static Tuple <bool, bool> GetIsInDangerAndUnderFire(IXY location, Map map, Tank enemy1, Tank enemy2) { return(GetIsInDangerAndUnderFire(location.X, location.Y, map, enemy1, enemy2)); }
public double Distance(IXY xy) { return((this - new XY(xy.X, xy.Y)).Norm); }
public XY(IXY xy) : this(xy.X, xy.Y) { }