5dplomacy/MultiversalDiplomacy/Model/OrderHistory.cs

34 lines
897 B
C#
Raw Normal View History

2022-11-09 00:25:47 +00:00
using System.Collections.ObjectModel;
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
public OrderHistory()
: this([], [], [])
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);
}
}