/// <summary>Initializes a new instance of the <see cref="RouteCell"/> class.</summary> /// <param name="row">Cell row position</param> /// <param name="column">Cell column position</param> /// <param name="direction">route cell direction</param> /// <param name="distance">route cell distance</param> /// <param name="grid">grid owner of this route</param> public RouteCell(int row, int column, Drone.Direction direction, int distance, Grid grid) : this(row, column, direction) { this.Distance = distance; if (grid != null) { this.IsPacket = grid.IsPacket(this); this.IsRoute = grid.IsRoute(this); this.IsFree = grid.IsFree(this); this.IsStartRoute = grid.IsStartRoute(this); if (this.IsPacket) { this.WillBreakDelivery = grid.WillBreakDelivery(this, this.Distance); } else { this.WillBreakDelivery = false; } } }
/// <summary>Initializes a new instance of the <see cref="RouteCell"/> class.</summary> /// <param name="row">Cell row position</param> /// <param name="column">Cell column position</param> /// <param name="direction">route cell direction</param> public RouteCell(int row, int column, Drone.Direction direction) : base(row, column) { this.Direction = direction; this.Distance = 0; }