import { Unit, Location } from "./types"; import { Order } from "./order"; /** * Errors while resolving orders * @typeparam Detail The detail of the error */ export declare class Error { } /** * Error that a power does not satisify conditions. * (e.g., A power does not have enough number of supply centers.) */ export declare class PowerWithProblem extends Error { power: Power; constructor(power: Power); } /** * Error that a unit tries to move an unmovable location. */ export declare class UnmovableLocation extends Error { unit: Unit; destination: Location; constructor(unit: Unit, destination: Location); } /** * Error that a unit tries to suppor an unsupportable order. */ export declare class UnsupportableLocation extends Error { unit: Unit; destination: Location; constructor(unit: Unit, destination: Location); } /** * Error that a unit tries to convoy an invalid order. */ export declare class UnconvoyableLocation extends Error { unit: Unit; destination: Location; constructor(unit: Unit, destination: Location); } /** * Error that a power tries to build an unbuildable location. */ export declare class UnbuildableLocation extends Error { unit: Unit; constructor(unit: Unit); } /** * Error that a unit does not existed. */ export declare class UnitNotExisted extends Error { unit: Unit; constructor(unit: Unit); } /** * Error that a player writes an invalid order. */ export declare class CannotBeOrdered extends Error { order: Order; constructor(order: Order); } /** * Error that a player writes an invalid order. */ export declare class InvalidPhase extends Error { order: Order; constructor(order: Order); } export declare class SeveralOrders extends Error { units: Set>; constructor(units: Set> | Array>); } export declare class OrderNotExisted extends Error { unit: Unit; constructor(unit: Unit); }