5dplomacy/MultiversalDiplomacy/Orders/MoveOrder.cs

34 lines
858 B
C#

using MultiversalDiplomacy.Model;
using static MultiversalDiplomacy.Model.Location;
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>
public Season Season { get; }
/// <summary>
/// The destination province/location to which the unit should move.
/// </summary>
public string Location { get; }
public MoveOrder(string power, Unit unit, Season season, string location)
: base (power, unit)
{
this.Season = season;
this.Location = location;
}
public override string ToString()
{
return $"{this.Unit} -> {Season.Timeline}-{SplitKey(Location).province}@{Season.Turn}";
}
}