2024-08-15 04:12:58 +00:00
|
|
|
using System.Text.Json.Serialization;
|
2022-11-09 00:25:47 +00:00
|
|
|
|
|
|
|
using MultiversalDiplomacy.Orders;
|
|
|
|
|
|
|
|
namespace MultiversalDiplomacy.Model;
|
|
|
|
|
|
|
|
public class OrderHistory
|
|
|
|
{
|
2024-08-15 01:45:35 +00:00
|
|
|
public List<UnitOrder> Orders { get; }
|
2022-11-09 00:25:47 +00:00
|
|
|
|
2024-08-15 01:45:35 +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
|
|
|
|
2024-08-15 01:45:35 +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
|
|
|
|
2024-08-15 04:12:58 +00:00
|
|
|
[JsonConstructor]
|
2022-11-09 00:25:47 +00:00
|
|
|
public OrderHistory(
|
|
|
|
List<UnitOrder> orders,
|
2024-08-15 01:45:35 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|