2022-02-18 22:52:15 +00:00
|
|
|
using MultiversalDiplomacy.Adjudicate;
|
2022-03-13 07:15:26 +00:00
|
|
|
using MultiversalDiplomacy.Model;
|
2022-02-18 22:52:15 +00:00
|
|
|
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;
|
2022-02-18 22:52:15 +00:00
|
|
|
|
|
|
|
public TestAdjudicator(
|
2022-03-13 07:15:26 +00:00
|
|
|
Func<World, List<Order>, List<OrderValidation>> validateOrdersCallback)
|
2022-02-18 22:52:15 +00:00
|
|
|
{
|
|
|
|
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);
|
2022-02-18 22:52:15 +00:00
|
|
|
}
|