5dplomacy/MultiversalDiplomacy/Model/OrderHistory.cs

34 lines
897 B
C#

using System.Collections.ObjectModel;
using MultiversalDiplomacy.Orders;
namespace MultiversalDiplomacy.Model;
public class OrderHistory
{
public List<UnitOrder> Orders { get; }
/// <summary>
/// Map from unit designation to dislodge outcome.
/// </summary>
public Dictionary<string, bool> IsDislodgedOutcomes { get; }
/// <summary>
/// Map from designation of the ordered unit to move outcome.
/// </summary>
public Dictionary<string, bool> DoesMoveOutcomes { get; }
public OrderHistory()
: this([], [], [])
{}
public OrderHistory(
List<UnitOrder> orders,
Dictionary<string, bool> isDislodgedOutcomes,
Dictionary<string, bool> doesMoveOutcomes)
{
this.Orders = new(orders);
this.IsDislodgedOutcomes = new(isDislodgedOutcomes);
this.DoesMoveOutcomes = new(doesMoveOutcomes);
}
}