5dplomacy/MultiversalDiplomacy/Model/OrderHistory.cs

31 lines
858 B
C#
Raw Normal View History

using System.Text.Json.Serialization;
2022-11-09 00:25:47 +00:00
using MultiversalDiplomacy.Orders;
namespace MultiversalDiplomacy.Model;
public class OrderHistory
{
public List<UnitOrder> Orders { get; }
2022-11-09 00:25:47 +00:00
/// <summary>
/// Map from unit designation to dislodge outcome.
/// </summary>
public Dictionary<string, bool> IsDislodgedOutcomes { get; }
2022-11-09 00:25:47 +00:00
/// <summary>
/// Map from designation of the ordered unit to move outcome.
/// </summary>
public Dictionary<string, bool> DoesMoveOutcomes { get; }
2022-11-09 00:25:47 +00:00
[JsonConstructor]
2022-11-09 00:25:47 +00:00
public OrderHistory(
List<UnitOrder> orders,
Dictionary<string, bool> isDislodgedOutcomes,
Dictionary<string, bool> doesMoveOutcomes)
2022-11-09 00:25:47 +00:00
{
this.Orders = new(orders);
this.IsDislodgedOutcomes = new(isDislodgedOutcomes);
this.DoesMoveOutcomes = new(doesMoveOutcomes);
}
}