using MultiversalDiplomacy.Model;
namespace MultiversalDiplomacy.Orders;
///
/// An order for a unit to support another unit's move order.
///
public class SupportMoveOrder : SupportOrder
{
///
/// The destination season to which the target is moving.
///
public Season Season { get; }
///
/// The destination location to which the target is moving.
///
public Location Location { get; }
///
/// The destination province to which the target is moving.
///
public Province Province => this.Location.Province;
///
/// The target's destination's spatiotemporal location as a province-season tuple.
///
public (Province province, Season season) Point => (this.Province, this.Season);
public SupportMoveOrder(Power power, Unit unit, Unit target, Season season, Location location)
: base(power, unit, target)
{
this.Season = season;
this.Location = location;
}
public bool IsSupportFor(MoveOrder move)
=> this.Target == move.Unit
&& this.Season == move.Season
&& this.Location == move.Location;
}