@typed-tabletop-simulator/lib
Version:
Library with some helping modules for working with Tabletop Simulator
17 lines (16 loc) • 617 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCurrentGrid = void 0;
const flatHexGrid_1 = require("./flatHexGrid");
const pointyHexGrid_1 = require("./pointyHexGrid");
const getCurrentGrid = () => {
switch (Grid.type) {
case 2 /* GridType.HorizontalHexes */:
return new flatHexGrid_1.default(Grid.sizeX / 2);
case 3 /* GridType.VerticalHexes */:
return new pointyHexGrid_1.default(Grid.sizeX / 2);
default:
throw `Can not create a grid for grid: ${Grid.type}`;
}
};
exports.getCurrentGrid = getCurrentGrid;