diff --git a/MultiversalDiplomacy/Orders/SupportHoldOrder.cs b/MultiversalDiplomacy/Orders/SupportHoldOrder.cs index 97ddbb9..eb8a3a4 100644 --- a/MultiversalDiplomacy/Orders/SupportHoldOrder.cs +++ b/MultiversalDiplomacy/Orders/SupportHoldOrder.cs @@ -5,16 +5,10 @@ namespace MultiversalDiplomacy.Orders; /// /// An order for a unit to support another unit's hold order. /// -public class SupportHoldOrder : UnitOrder +public class SupportHoldOrder : SupportOrder { - /// - /// The unit to support. - /// - public Unit Target { get; } - public SupportHoldOrder(Power power, Unit unit, Unit target) - : base (power, unit) + : base (power, unit, target) { - this.Target = target; } } \ No newline at end of file diff --git a/MultiversalDiplomacy/Orders/SupportMoveOrder.cs b/MultiversalDiplomacy/Orders/SupportMoveOrder.cs index 45fae77..3f98917 100644 --- a/MultiversalDiplomacy/Orders/SupportMoveOrder.cs +++ b/MultiversalDiplomacy/Orders/SupportMoveOrder.cs @@ -5,13 +5,8 @@ namespace MultiversalDiplomacy.Orders; /// /// An order for a unit to support another unit's move order. /// -public class SupportMoveOrder : UnitOrder +public class SupportMoveOrder : SupportOrder { - /// - /// The unit to support. - /// - public Unit Target { get; } - /// /// The destination season to which the target is moving. /// @@ -23,9 +18,8 @@ public class SupportMoveOrder : UnitOrder public Location Location { get; } public SupportMoveOrder(Power power, Unit unit, Unit target, Season season, Location location) - : base (power, unit) + : base(power, unit, target) { - this.Target = target; this.Season = season; this.Location = location; } diff --git a/MultiversalDiplomacy/Orders/SupportOrder.cs b/MultiversalDiplomacy/Orders/SupportOrder.cs new file mode 100644 index 0000000..db80b67 --- /dev/null +++ b/MultiversalDiplomacy/Orders/SupportOrder.cs @@ -0,0 +1,20 @@ +using MultiversalDiplomacy.Model; + +namespace MultiversalDiplomacy.Orders; + +/// +/// An order for a unit to support another unit. +/// +public abstract class SupportOrder : UnitOrder +{ + /// + /// The unit to support. + /// + public Unit Target { get; } + + public SupportOrder(Power power, Unit unit, Unit target) + : base (power, unit) + { + this.Target = target; + } +} \ No newline at end of file