import { Coordinates, HexGridSystem, Location, MaterialItem, MoveItem, Polyhex, XYCoordinates } from '@gamepark/rules-api'; import { LocationDescription } from '../components'; import { ItemContext, Locator, MaterialContext } from './Locator'; export declare enum HexOrientation { Flat = 1, Pointy = 2 } /** * This locator is responsible for placing locations and items on a hexagonal grid. */ export declare abstract class HexagonalGridLocator
extends Locator
{
/**
* The coordinates system used by the location and items to place
*/
abstract coordinatesSystem: HexGridSystem;
/**
* When using Axial coordinates system, you must specify the hexagons orientation
*/
orientation?: HexOrientation;
/**
* The size of one hexagon, i.e. the distance between the center of the hexagon and its vertices.
* For irregular hexagons, the distance can use XY values.
*/
abstract size: number | XYCoordinates;
/**
* Horizontal size of a hexagon
*/
protected get sizeX(): number;
/**
* Vertical size of a hexagon
*/
protected get sizeY(): number;
/**
* Polyhex of the drop area
*/
dropArea?: Polyhex , _context: MaterialContext ): Polyhex , context: MaterialContext ): Partial , context: MaterialContext ): Partial , context: ItemContext ): Partial , _context: MaterialContext ): number;
/**
* Returns the drop locations for current dragged item. The hexagonal grid must be one simple drop location.
*/
getDropLocations(moves: MoveItem [], context: ItemContext ): Location [];
dropPreview: boolean;
/**
* Generate automatically a {@link HexGridDropAreaDescription} based on the grid boundaries
*/
getLocationDescription(location: Location , context: MaterialContext | ItemContext ): LocationDescription | undefined;
getBoundaries(polyhex: Polyhex