UNPKG

@real_one_chess_king/game-logic

Version:
15 lines (14 loc) 1.12 kB
import { KillAffect, MoveAffect, SpawnAffect, TransformationAffect, Affect } from "./affect.types"; import { Coordinate } from "../coordinate"; import { PieceType } from "../piece/piece.constants"; export declare function isKillAffect(affect: Affect): affect is KillAffect; export declare function isMoveAffect(affect: Affect): affect is MoveAffect; export declare function isSpawnAffect(affect: Affect): affect is SpawnAffect; export declare function isTransformationAffect(affect: Affect): affect is TransformationAffect; export declare function isUserSelectableAffect(affect: Affect): boolean; export declare function markAsUserSelected(a: Affect): Affect; export declare function buildMoveAffect(from: Coordinate, to: Coordinate): MoveAffect; export declare function buildKillAffect(from: Coordinate): KillAffect; export declare function buildSpawnAffect(from: Coordinate): SpawnAffect; export declare function buildTransformationAffect(from: Coordinate, destPieceType: PieceType, sourcePieceType: PieceType): TransformationAffect; export declare function getUserSelectedMoveAffect(affects: Affect[]): MoveAffect;