import { Unit, Board } from "./types"; import { Order } from "./order"; import { Error } from "./error"; export interface Validator { /** * @return The set of units that are requred orders. */ unitsRequiringOrder(board: Board): Set>; /** * @return The error message of the order. If the order is valid, it's null. */ errorOfOrder(board: Board, order: Order): Error | null; /** * @return The error message of the orders. If the set of the orders is valid, it's null. */ errorOfOrders(board: Board, orders: Set>): Error | null; }