UNPKG

@real_one_chess_king/game-logic

Version:
9 lines (8 loc) 542 B
import { Direction } from "./movement-rule"; import { Action } from "../../affect/affect.types"; import { StraightMovementRule, StraightMovementRuleConfig } from "./straight-movement.rule"; export declare class VerticalMovementRule extends StraightMovementRule { constructor({ id, name, moveToEmpty, moveToKill, collision, distance, directions, speed, }: StraightMovementRuleConfig); protected possibleDirrections: Direction[]; protected calculateNewCoord: (x: number, y: number, diff: number, dirrection: Direction) => Action; }