private int DistanceTo(BuildingFactory f)//checks the distance to other buildings { if (f.GetType() == typeof(BuildingFactory)) { BuildingFactory b = (BuildingFactory)f; int d = (Xpos - f.Xpos) + Math.Abs(Ypos - f.Ypos); return(d); } else { return(0); } }
private int DistanceTo(BuildingFactory b) { throw new NotImplementedException(); }