5dplomacy/MultiversalDiplomacyTests/TestAdjudicator.cs

19 lines
610 B
C#
Raw Normal View History

using MultiversalDiplomacy.Adjudicate;
2022-03-13 07:15:26 +00:00
using MultiversalDiplomacy.Model;
using MultiversalDiplomacy.Orders;
namespace MultiversalDiplomacyTests;
public class TestAdjudicator : IPhaseAdjudicator
{
2022-03-13 07:15:26 +00:00
private Func<World, List<Order>, List<OrderValidation>> ValidateOrdersCallback;
public TestAdjudicator(
2022-03-13 07:15:26 +00:00
Func<World, List<Order>, List<OrderValidation>> validateOrdersCallback)
{
this.ValidateOrdersCallback = validateOrdersCallback;
}
2022-03-13 07:15:26 +00:00
public List<OrderValidation> ValidateOrders(World world, List<Order> orders)
=> this.ValidateOrdersCallback.Invoke(world, orders);
}