@gamepark/rules-api
Version:
API to implement the rules of a board game
13 lines (12 loc) • 459 B
TypeScript
import { HexGridSystem } from './grid.hex.util';
import { XYCoordinates } from './grid.util';
export type AdjacentGroup<T = number> = {
values: T[];
coordinates: XYCoordinates[];
};
type CreateAdjacentGroupsOptions<T = number> = {
isEmpty?: (value: T) => boolean;
hexGridSystem?: HexGridSystem;
};
export declare function createAdjacentGroups<T = number>(map: T[][], options?: CreateAdjacentGroupsOptions<T>): AdjacentGroup<T>[][];
export {};