2022-02-19 00:58:16 +00:00
|
|
|
using MultiversalDiplomacy.Model;
|
|
|
|
|
2024-08-16 05:00:25 +00:00
|
|
|
using static MultiversalDiplomacy.Model.Location;
|
|
|
|
|
2022-02-19 00:58:16 +00:00
|
|
|
namespace MultiversalDiplomacy.Orders;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// An order for a unit to move to another province.
|
|
|
|
/// </summary>
|
|
|
|
public class MoveOrder : UnitOrder
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// The destination season to which the unit should move.
|
|
|
|
/// </summary>
|
2024-08-15 20:51:41 +00:00
|
|
|
public Season Season { get; }
|
2022-02-19 00:58:16 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The destination location to which the unit should move.
|
|
|
|
/// </summary>
|
2024-08-16 05:00:25 +00:00
|
|
|
public string Location { get; }
|
2022-02-19 00:58:16 +00:00
|
|
|
|
2024-08-16 05:00:25 +00:00
|
|
|
public MoveOrder(string power, Unit unit, Season season, string location)
|
2022-02-19 00:58:16 +00:00
|
|
|
: base (power, unit)
|
|
|
|
{
|
|
|
|
this.Season = season;
|
|
|
|
this.Location = location;
|
|
|
|
}
|
2022-03-24 15:12:11 +00:00
|
|
|
|
2022-04-07 22:58:17 +00:00
|
|
|
public override string ToString()
|
|
|
|
{
|
2024-08-16 05:00:25 +00:00
|
|
|
return $"{this.Unit} -> {Season.Timeline}-{SplitKey(Location).province}@{Season.Turn}";
|
2022-04-07 22:58:17 +00:00
|
|
|
}
|
2022-02-19 00:58:16 +00:00
|
|
|
}
|