@gamepark/rules-api
Version:
API to implement the rules of a board game
14 lines (13 loc) • 752 B
TypeScript
import { Material, MaterialItem } from '../../items';
import { LocationStrategy } from './LocationStrategy';
/**
* This strategy help to maintain a consecutive sequence of numbers starting with 0 for items at the same location,
* for example a deck or a hand of cards.
*/
export declare class PositiveSequenceStrategy<P extends number = number, M extends number = number, L extends number = number> implements LocationStrategy<P, M, L> {
axis: 'x' | 'y' | 'z';
constructor(axis?: 'x' | 'y' | 'z');
addItem(material: Material<P, M, L>, item: MaterialItem<P, L>): void;
moveItem(material: Material<P, M, L>, item: MaterialItem<P, L>, index: number): void;
removeItem(material: Material<P, M, L>, item: MaterialItem<P, L>): void;
}