using MultiversalDiplomacy.Model;
namespace MultiversalDiplomacy.Orders;
///
/// An order given to a specific unit.
///
public abstract class UnitOrder : Order
{
///
/// The ordered unit.
///
public Unit Unit { get; }
public UnitOrder(Power power, Unit unit) : base(power)
{
this.Unit = unit;
}
///
/// Returns whether a move order is moving into this order's unit's province.
///
public bool IsIncoming(MoveOrder other)
=> this != other
&& other.Season == this.Unit.Season
&& other.Province == this.Unit.Province;
}