using MultiversalDiplomacy.Model; namespace MultiversalDiplomacy.Orders; /// /// An order for a unit to move to another province. /// public class MoveOrder : UnitOrder { /// /// The destination season to which the unit should move. /// public Season Season { get; } /// /// The destination location to which the unit should move. /// public Location Location { get; } /// /// The destination province to which the unit should move. /// public Province Province => this.Location.Province; /// /// The destination's spatiotemporal location as a province-season tuple. /// public (Province province, Season season) Point => (this.Province, this.Season); public MoveOrder(Power power, Unit unit, Season season, Location location) : base (power, unit) { this.Season = season; this.Location = location; } public override string ToString() { return $"{this.Unit} -> {(this.Province, this.Season).ToShort()}"; } /// /// Returns whether another move order has the same destination as this order. /// public bool IsCompeting(MoveOrder other) => this != other && this.Season == other.Season && this.Province == other.Province; }