@thegraid/hexlib 1.1.0 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/game-play.d.ts +8 -15
- package/dist/game-play.d.ts.map +1 -1
- package/dist/game-play.js +9 -16
- package/dist/game-play.js.map +1 -1
- package/dist/game-setup.d.ts +43 -18
- package/dist/game-setup.d.ts.map +1 -1
- package/dist/game-setup.js +59 -27
- package/dist/game-setup.js.map +1 -1
- package/dist/hex-intfs.d.ts +2 -1
- package/dist/hex-intfs.d.ts.map +1 -1
- package/dist/hex-intfs.js +14 -13
- package/dist/hex-intfs.js.map +1 -1
- package/dist/hex.d.ts +111 -45
- package/dist/hex.d.ts.map +1 -1
- package/dist/hex.js +92 -37
- package/dist/hex.js.map +1 -1
- package/dist/meeple.d.ts +10 -8
- package/dist/meeple.d.ts.map +1 -1
- package/dist/meeple.js +12 -20
- package/dist/meeple.js.map +1 -1
- package/dist/plan-proxy.js +4 -4
- package/dist/scenario-parser.d.ts +1 -0
- package/dist/scenario-parser.d.ts.map +1 -1
- package/dist/scenario-parser.js +2 -2
- package/dist/scenario-parser.js.map +1 -1
- package/dist/shapes.js +2 -2
- package/dist/stream-writer.js +3 -3
- package/dist/table-params.d.ts.map +1 -1
- package/dist/table-params.js +1 -1
- package/dist/table-params.js.map +1 -1
- package/dist/table.d.ts +125 -99
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +50 -29
- package/dist/table.js.map +1 -1
- package/dist/tile.d.ts +61 -16
- package/dist/tile.d.ts.map +1 -1
- package/dist/tile.js +75 -22
- package/dist/tile.js.map +1 -1
- package/package.json +3 -2
package/dist/table.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Container, DisplayObject, EventDispatcher, Shape, Stage, Text } from "@
|
|
|
6
6
|
import { NamedContainer, NamedObject, type GamePlay } from "./game-play";
|
|
7
7
|
import { Scenario } from "./game-setup";
|
|
8
8
|
import type { GameState } from "./game-state";
|
|
9
|
-
import { Hex, IHex2,
|
|
9
|
+
import { Hex, IHex2, IdHex, RecycleHex, HexM } from "./hex";
|
|
10
10
|
import { XYWH } from "./hex-intfs";
|
|
11
11
|
import { Player } from "./player";
|
|
12
12
|
import { PlayerPanel } from "./player-panel";
|
|
@@ -63,7 +63,7 @@ export declare class Table {
|
|
|
63
63
|
gamePlay: GamePlay;
|
|
64
64
|
stage: Stage;
|
|
65
65
|
bgRect: Shape;
|
|
66
|
-
hexMap:
|
|
66
|
+
hexMap: HexM<IHex2>;
|
|
67
67
|
paramGUIs: ParamGUI[];
|
|
68
68
|
netGUI: ParamGUI;
|
|
69
69
|
/** initial visibility for toggleText */
|
|
@@ -82,7 +82,7 @@ export declare class Table {
|
|
|
82
82
|
*
|
|
83
83
|
* typically: this.hexC = this.hexMap.hexC as Constructor\<IHex2\> */
|
|
84
84
|
hexC: Constructor<IHex2>;
|
|
85
|
-
overlayCont:
|
|
85
|
+
readonly overlayCont: NamedContainer;
|
|
86
86
|
constructor(stage: Stage);
|
|
87
87
|
/** shows the last 2 start of turn lines */
|
|
88
88
|
turnLog: TextLog;
|
|
@@ -118,7 +118,7 @@ export declare class Table {
|
|
|
118
118
|
setUnit: (unit: Tile, meep?: boolean) => void;
|
|
119
119
|
tile: Tile | undefined;
|
|
120
120
|
meep: import("./meeple").Meeple | undefined;
|
|
121
|
-
constructorCode: (map:
|
|
121
|
+
constructorCode: (map: HexM<{
|
|
122
122
|
implementsIHex2: boolean;
|
|
123
123
|
readonly cont: import("./hex").HexCont;
|
|
124
124
|
readonly radius: number;
|
|
@@ -144,7 +144,7 @@ export declare class Table {
|
|
|
144
144
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
145
145
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
146
146
|
metricDist: (hex: Hex) => number;
|
|
147
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
147
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
148
148
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
149
149
|
_tile: import("./tile").MapTile | undefined;
|
|
150
150
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -178,20 +178,20 @@ export declare class Table {
|
|
|
178
178
|
_district: number | undefined;
|
|
179
179
|
readonly isOnMap: boolean;
|
|
180
180
|
_isLegal: boolean;
|
|
181
|
-
readonly map:
|
|
181
|
+
readonly map: HexM<Hex>;
|
|
182
182
|
readonly row: number;
|
|
183
183
|
readonly col: number;
|
|
184
184
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
185
185
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
186
186
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
187
187
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
188
|
-
forEachLinkHex: (func: (hex:
|
|
188
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
189
189
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
190
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
190
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
191
191
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
192
192
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
193
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
194
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
193
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
194
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
195
195
|
radialDist: (hex: Hex) => number;
|
|
196
196
|
}>, row: number, col: number, name?: string | undefined) => void;
|
|
197
197
|
showText: (vis?: boolean) => void;
|
|
@@ -201,7 +201,7 @@ export declare class Table {
|
|
|
201
201
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
202
202
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
203
203
|
metricDist: (hex: Hex) => number;
|
|
204
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
204
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
205
205
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
206
206
|
_tile: import("./tile").MapTile | undefined;
|
|
207
207
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -235,20 +235,20 @@ export declare class Table {
|
|
|
235
235
|
_district: number | undefined;
|
|
236
236
|
readonly isOnMap: boolean;
|
|
237
237
|
_isLegal: boolean;
|
|
238
|
-
readonly map:
|
|
238
|
+
readonly map: HexM<Hex>;
|
|
239
239
|
readonly row: number;
|
|
240
240
|
readonly col: number;
|
|
241
241
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
242
242
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
243
243
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
244
244
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
245
|
-
forEachLinkHex: (func: (hex:
|
|
245
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
246
246
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
247
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
247
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
248
248
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
249
249
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
250
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
251
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
250
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
251
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
252
252
|
radialDist: (hex: Hex) => number;
|
|
253
253
|
};
|
|
254
254
|
noRowHex(name: string, crxy: {
|
|
@@ -272,7 +272,7 @@ export declare class Table {
|
|
|
272
272
|
setUnit: (unit: Tile, meep?: boolean) => void;
|
|
273
273
|
tile: Tile | undefined;
|
|
274
274
|
meep: import("./meeple").Meeple | undefined;
|
|
275
|
-
constructorCode: (map:
|
|
275
|
+
constructorCode: (map: HexM<{
|
|
276
276
|
implementsIHex2: boolean;
|
|
277
277
|
readonly cont: import("./hex").HexCont;
|
|
278
278
|
readonly radius: number;
|
|
@@ -298,7 +298,7 @@ export declare class Table {
|
|
|
298
298
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
299
299
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
300
300
|
metricDist: (hex: Hex) => number;
|
|
301
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
301
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
302
302
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
303
303
|
_tile: import("./tile").MapTile | undefined;
|
|
304
304
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -332,20 +332,20 @@ export declare class Table {
|
|
|
332
332
|
_district: number | undefined;
|
|
333
333
|
readonly isOnMap: boolean;
|
|
334
334
|
_isLegal: boolean;
|
|
335
|
-
readonly map:
|
|
335
|
+
readonly map: HexM<Hex>;
|
|
336
336
|
readonly row: number;
|
|
337
337
|
readonly col: number;
|
|
338
338
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
339
339
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
340
340
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
341
341
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
342
|
-
forEachLinkHex: (func: (hex:
|
|
342
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
343
343
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
344
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
344
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
345
345
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
346
346
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
347
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
348
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
347
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
348
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
349
349
|
radialDist: (hex: Hex) => number;
|
|
350
350
|
}>, row: number, col: number, name?: string | undefined) => void;
|
|
351
351
|
showText: (vis?: boolean) => void;
|
|
@@ -355,7 +355,7 @@ export declare class Table {
|
|
|
355
355
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
356
356
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
357
357
|
metricDist: (hex: Hex) => number;
|
|
358
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
358
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
359
359
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
360
360
|
_tile: import("./tile").MapTile | undefined;
|
|
361
361
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -389,20 +389,20 @@ export declare class Table {
|
|
|
389
389
|
_district: number | undefined;
|
|
390
390
|
readonly isOnMap: boolean;
|
|
391
391
|
_isLegal: boolean;
|
|
392
|
-
readonly map:
|
|
392
|
+
readonly map: HexM<Hex>;
|
|
393
393
|
readonly row: number;
|
|
394
394
|
readonly col: number;
|
|
395
395
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
396
396
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
397
397
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
398
398
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
399
|
-
forEachLinkHex: (func: (hex:
|
|
399
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
400
400
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
401
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
401
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
402
402
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
403
403
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
404
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
405
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
404
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
405
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
406
406
|
radialDist: (hex: Hex) => number;
|
|
407
407
|
};
|
|
408
408
|
/**
|
|
@@ -477,7 +477,7 @@ export declare class Table {
|
|
|
477
477
|
setUnit: (unit: Tile, meep?: boolean) => void;
|
|
478
478
|
tile: Tile | undefined;
|
|
479
479
|
meep: import("./meeple").Meeple | undefined;
|
|
480
|
-
constructorCode: (map:
|
|
480
|
+
constructorCode: (map: HexM<{
|
|
481
481
|
implementsIHex2: boolean;
|
|
482
482
|
readonly cont: import("./hex").HexCont;
|
|
483
483
|
readonly radius: number;
|
|
@@ -503,7 +503,7 @@ export declare class Table {
|
|
|
503
503
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
504
504
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
505
505
|
metricDist: (hex: Hex) => number;
|
|
506
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
506
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
507
507
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
508
508
|
_tile: import("./tile").MapTile | undefined;
|
|
509
509
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -537,20 +537,20 @@ export declare class Table {
|
|
|
537
537
|
_district: number | undefined;
|
|
538
538
|
readonly isOnMap: boolean;
|
|
539
539
|
_isLegal: boolean;
|
|
540
|
-
readonly map:
|
|
540
|
+
readonly map: HexM<Hex>;
|
|
541
541
|
readonly row: number;
|
|
542
542
|
readonly col: number;
|
|
543
543
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
544
544
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
545
545
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
546
546
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
547
|
-
forEachLinkHex: (func: (hex:
|
|
547
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
548
548
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
549
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
549
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
550
550
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
551
551
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
552
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
553
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
552
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
553
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
554
554
|
radialDist: (hex: Hex) => number;
|
|
555
555
|
}>, row: number, col: number, name?: string | undefined) => void;
|
|
556
556
|
showText: (vis?: boolean) => void;
|
|
@@ -560,7 +560,7 @@ export declare class Table {
|
|
|
560
560
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
561
561
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
562
562
|
metricDist: (hex: Hex) => number;
|
|
563
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
563
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
564
564
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
565
565
|
_tile: import("./tile").MapTile | undefined;
|
|
566
566
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -594,20 +594,20 @@ export declare class Table {
|
|
|
594
594
|
_district: number | undefined;
|
|
595
595
|
readonly isOnMap: boolean;
|
|
596
596
|
_isLegal: boolean;
|
|
597
|
-
readonly map:
|
|
597
|
+
readonly map: HexM<Hex>;
|
|
598
598
|
readonly row: number;
|
|
599
599
|
readonly col: number;
|
|
600
600
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
601
601
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
602
602
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
603
603
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
604
|
-
forEachLinkHex: (func: (hex:
|
|
604
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
605
605
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
606
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
606
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
607
607
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
608
608
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
609
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
610
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
609
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
610
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
611
611
|
radialDist: (hex: Hex) => number;
|
|
612
612
|
};
|
|
613
613
|
/** Params that affect the rules of the game & board
|
|
@@ -629,7 +629,12 @@ export declare class Table {
|
|
|
629
629
|
addDoneButton(actionCont: Container, rh: number): Container;
|
|
630
630
|
/** show player player score on table */
|
|
631
631
|
setPlayerScore(plyr: Player, score: number, rank?: number): void;
|
|
632
|
-
/** update table when a new Game is started.
|
|
632
|
+
/** update table when a new Game is started.
|
|
633
|
+
*
|
|
634
|
+
* default: [allTiles.makeDragable(); setNextPlayer(gamePlay.turnNumber)]
|
|
635
|
+
*
|
|
636
|
+
* A Tile or class of Tile may stopDragging() due to noLegalTargets().
|
|
637
|
+
*/
|
|
633
638
|
startGame(scenario: Scenario): void;
|
|
634
639
|
makeDragable(tile: DisplayObject): void;
|
|
635
640
|
hexUnderObj(dragObj: DisplayObject, legalOnly?: boolean): {
|
|
@@ -650,7 +655,7 @@ export declare class Table {
|
|
|
650
655
|
setUnit: (unit: Tile, meep?: boolean) => void;
|
|
651
656
|
tile: Tile | undefined;
|
|
652
657
|
meep: import("./meeple").Meeple | undefined;
|
|
653
|
-
constructorCode: (map:
|
|
658
|
+
constructorCode: (map: HexM<{
|
|
654
659
|
implementsIHex2: boolean;
|
|
655
660
|
readonly cont: import("./hex").HexCont;
|
|
656
661
|
readonly radius: number;
|
|
@@ -676,7 +681,7 @@ export declare class Table {
|
|
|
676
681
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
677
682
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
678
683
|
metricDist: (hex: Hex) => number;
|
|
679
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
684
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
680
685
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
681
686
|
_tile: import("./tile").MapTile | undefined;
|
|
682
687
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -710,20 +715,20 @@ export declare class Table {
|
|
|
710
715
|
_district: number | undefined;
|
|
711
716
|
readonly isOnMap: boolean;
|
|
712
717
|
_isLegal: boolean;
|
|
713
|
-
readonly map:
|
|
718
|
+
readonly map: HexM<Hex>;
|
|
714
719
|
readonly row: number;
|
|
715
720
|
readonly col: number;
|
|
716
721
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
717
722
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
718
723
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
719
724
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
720
|
-
forEachLinkHex: (func: (hex:
|
|
725
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
721
726
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
722
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
727
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
723
728
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
724
729
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
725
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
726
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
730
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
731
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
727
732
|
radialDist: (hex: Hex) => number;
|
|
728
733
|
}>, row: number, col: number, name?: string | undefined) => void;
|
|
729
734
|
showText: (vis?: boolean) => void;
|
|
@@ -733,7 +738,7 @@ export declare class Table {
|
|
|
733
738
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
734
739
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
735
740
|
metricDist: (hex: Hex) => number;
|
|
736
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
741
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
737
742
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
738
743
|
_tile: import("./tile").MapTile | undefined;
|
|
739
744
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -767,28 +772,33 @@ export declare class Table {
|
|
|
767
772
|
_district: number | undefined;
|
|
768
773
|
readonly isOnMap: boolean;
|
|
769
774
|
_isLegal: boolean;
|
|
770
|
-
readonly map:
|
|
775
|
+
readonly map: HexM<Hex>;
|
|
771
776
|
readonly row: number;
|
|
772
777
|
readonly col: number;
|
|
773
778
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
774
779
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
775
780
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
776
781
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
777
|
-
forEachLinkHex: (func: (hex:
|
|
782
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
778
783
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
779
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
784
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
780
785
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
781
786
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
782
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
783
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
787
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
788
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
784
789
|
radialDist: (hex: Hex) => number;
|
|
785
790
|
} | undefined;
|
|
786
791
|
dragContext: DragContext;
|
|
792
|
+
/** Direct callback from this.dragger. Invoke this.dragFunc0(tile, info, hexUnderTile) */
|
|
787
793
|
dragFunc(tile: DisplayObject, info?: DragInfo): void;
|
|
788
|
-
/** Table.dragFunc0
|
|
794
|
+
/** Table.dragFunc0
|
|
795
|
+
*
|
|
796
|
+
* Version of Table.dragFunc used to inject drag/start actions programatically.
|
|
797
|
+
*
|
|
798
|
+
* Calls out to Tile.dragFunc0(IHex2, DragContext)
|
|
789
799
|
* @param tile is being dragged
|
|
790
800
|
* @param info { first: boolean, event: MouseEvent }
|
|
791
|
-
* @param hex the
|
|
801
|
+
* @param hex the IHex2 which tile is currently over (may be undefined or off map)
|
|
792
802
|
*/
|
|
793
803
|
dragFunc0(tile: Tile, info?: DragInfo, hex?: {
|
|
794
804
|
implementsIHex2: boolean;
|
|
@@ -808,7 +818,7 @@ export declare class Table {
|
|
|
808
818
|
setUnit: (unit: Tile, meep?: boolean) => void;
|
|
809
819
|
tile: Tile | undefined;
|
|
810
820
|
meep: import("./meeple").Meeple | undefined;
|
|
811
|
-
constructorCode: (map:
|
|
821
|
+
constructorCode: (map: HexM<{
|
|
812
822
|
implementsIHex2: boolean;
|
|
813
823
|
readonly cont: import("./hex").HexCont;
|
|
814
824
|
readonly radius: number;
|
|
@@ -834,7 +844,7 @@ export declare class Table {
|
|
|
834
844
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
835
845
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
836
846
|
metricDist: (hex: Hex) => number;
|
|
837
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
847
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
838
848
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
839
849
|
_tile: import("./tile").MapTile | undefined;
|
|
840
850
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -868,20 +878,20 @@ export declare class Table {
|
|
|
868
878
|
_district: number | undefined;
|
|
869
879
|
readonly isOnMap: boolean;
|
|
870
880
|
_isLegal: boolean;
|
|
871
|
-
readonly map:
|
|
881
|
+
readonly map: HexM<Hex>;
|
|
872
882
|
readonly row: number;
|
|
873
883
|
readonly col: number;
|
|
874
884
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
875
885
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
876
886
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
877
887
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
878
|
-
forEachLinkHex: (func: (hex:
|
|
888
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
879
889
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
880
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
890
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
881
891
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
882
892
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
883
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
884
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
893
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
894
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
885
895
|
radialDist: (hex: Hex) => number;
|
|
886
896
|
}>, row: number, col: number, name?: string | undefined) => void;
|
|
887
897
|
showText: (vis?: boolean) => void;
|
|
@@ -891,7 +901,7 @@ export declare class Table {
|
|
|
891
901
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
892
902
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
893
903
|
metricDist: (hex: Hex) => number;
|
|
894
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
904
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
895
905
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
896
906
|
_tile: import("./tile").MapTile | undefined;
|
|
897
907
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -925,27 +935,43 @@ export declare class Table {
|
|
|
925
935
|
_district: number | undefined;
|
|
926
936
|
readonly isOnMap: boolean;
|
|
927
937
|
_isLegal: boolean;
|
|
928
|
-
readonly map:
|
|
938
|
+
readonly map: HexM<Hex>;
|
|
929
939
|
readonly row: number;
|
|
930
940
|
readonly col: number;
|
|
931
941
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
932
942
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
933
943
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
934
944
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
935
|
-
forEachLinkHex: (func: (hex:
|
|
945
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
936
946
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
937
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
947
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
938
948
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
939
949
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
940
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
941
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
950
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
951
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
942
952
|
radialDist: (hex: Hex) => number;
|
|
943
953
|
} | undefined): void;
|
|
954
|
+
/** invoke dragShift callback if shift state changes */
|
|
944
955
|
checkShift(hex: IHex2 | undefined, ctx: DragContext): void;
|
|
956
|
+
/**
|
|
957
|
+
* Try start dragging.
|
|
958
|
+
* Abort if tile.cantBeMoved(player)
|
|
959
|
+
*
|
|
960
|
+
* Inform tile.dragStart(ctx)
|
|
961
|
+
*
|
|
962
|
+
* Mark all legal Hexes, set ctx.nLegal
|
|
963
|
+
*
|
|
964
|
+
* tile.moveTo(undefined); // dropFunc() will placeTile on targetHex/fromHex.
|
|
965
|
+
*
|
|
966
|
+
* Invoke tile.noLegalTarget(ctx) if nLegal === 0
|
|
967
|
+
*
|
|
968
|
+
* @param tile the Tile to be Dragged
|
|
969
|
+
* @param ctx DragContext with shift/ctrl from table.dragFunc0()
|
|
970
|
+
*/
|
|
945
971
|
dragStart(tile: Tile, ctx: DragContext): void;
|
|
946
|
-
/** state of shiftKey has changed during drag */
|
|
972
|
+
/** state of shiftKey has changed during drag. call tile.dragShift(). */
|
|
947
973
|
dragShift(tile: Tile | undefined, shiftKey: boolean | undefined, ctx: DragContext): void;
|
|
948
|
-
/** Tile
|
|
974
|
+
/** dropFunc for each Dragable/Tile -> tile.dropFunc0(hex, ctx) */
|
|
949
975
|
dropFunc(dobj: DisplayObject, info?: DragInfo, hex?: {
|
|
950
976
|
implementsIHex2: boolean;
|
|
951
977
|
readonly cont: import("./hex").HexCont;
|
|
@@ -964,7 +990,7 @@ export declare class Table {
|
|
|
964
990
|
setUnit: (unit: Tile, meep?: boolean) => void;
|
|
965
991
|
tile: Tile | undefined;
|
|
966
992
|
meep: import("./meeple").Meeple | undefined;
|
|
967
|
-
constructorCode: (map:
|
|
993
|
+
constructorCode: (map: HexM<{
|
|
968
994
|
implementsIHex2: boolean;
|
|
969
995
|
readonly cont: import("./hex").HexCont;
|
|
970
996
|
readonly radius: number;
|
|
@@ -990,7 +1016,7 @@ export declare class Table {
|
|
|
990
1016
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
991
1017
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
992
1018
|
metricDist: (hex: Hex) => number;
|
|
993
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
1019
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
994
1020
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
995
1021
|
_tile: import("./tile").MapTile | undefined;
|
|
996
1022
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -1024,20 +1050,20 @@ export declare class Table {
|
|
|
1024
1050
|
_district: number | undefined;
|
|
1025
1051
|
readonly isOnMap: boolean;
|
|
1026
1052
|
_isLegal: boolean;
|
|
1027
|
-
readonly map:
|
|
1053
|
+
readonly map: HexM<Hex>;
|
|
1028
1054
|
readonly row: number;
|
|
1029
1055
|
readonly col: number;
|
|
1030
1056
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1031
1057
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1032
1058
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
1033
1059
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
1034
|
-
forEachLinkHex: (func: (hex:
|
|
1060
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
1035
1061
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
1036
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
1062
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
1037
1063
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
1038
1064
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1039
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
1040
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
1065
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1066
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1041
1067
|
radialDist: (hex: Hex) => number;
|
|
1042
1068
|
}>, row: number, col: number, name?: string | undefined) => void;
|
|
1043
1069
|
showText: (vis?: boolean) => void;
|
|
@@ -1047,7 +1073,7 @@ export declare class Table {
|
|
|
1047
1073
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
1048
1074
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1049
1075
|
metricDist: (hex: Hex) => number;
|
|
1050
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
1076
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
1051
1077
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
1052
1078
|
_tile: import("./tile").MapTile | undefined;
|
|
1053
1079
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -1081,20 +1107,20 @@ export declare class Table {
|
|
|
1081
1107
|
_district: number | undefined;
|
|
1082
1108
|
readonly isOnMap: boolean;
|
|
1083
1109
|
_isLegal: boolean;
|
|
1084
|
-
readonly map:
|
|
1110
|
+
readonly map: HexM<Hex>;
|
|
1085
1111
|
readonly row: number;
|
|
1086
1112
|
readonly col: number;
|
|
1087
1113
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1088
1114
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1089
1115
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
1090
1116
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
1091
|
-
forEachLinkHex: (func: (hex:
|
|
1117
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
1092
1118
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
1093
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
1119
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
1094
1120
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
1095
1121
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1096
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
1097
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
1122
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1123
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1098
1124
|
radialDist: (hex: Hex) => number;
|
|
1099
1125
|
} | undefined): void;
|
|
1100
1126
|
/** synthesize dragStart(tile), tile.dragFunc0(hex), dropFunc(tile); */
|
|
@@ -1122,7 +1148,7 @@ export declare class Table {
|
|
|
1122
1148
|
setUnit: (unit: Tile, meep?: boolean) => void;
|
|
1123
1149
|
tile: Tile | undefined;
|
|
1124
1150
|
meep: import("./meeple").Meeple | undefined;
|
|
1125
|
-
constructorCode: (map:
|
|
1151
|
+
constructorCode: (map: HexM<{
|
|
1126
1152
|
implementsIHex2: boolean;
|
|
1127
1153
|
readonly cont: import("./hex").HexCont;
|
|
1128
1154
|
readonly radius: number;
|
|
@@ -1148,7 +1174,7 @@ export declare class Table {
|
|
|
1148
1174
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
1149
1175
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1150
1176
|
metricDist: (hex: Hex) => number;
|
|
1151
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
1177
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
1152
1178
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
1153
1179
|
_tile: import("./tile").MapTile | undefined;
|
|
1154
1180
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -1182,20 +1208,20 @@ export declare class Table {
|
|
|
1182
1208
|
_district: number | undefined;
|
|
1183
1209
|
readonly isOnMap: boolean;
|
|
1184
1210
|
_isLegal: boolean;
|
|
1185
|
-
readonly map:
|
|
1211
|
+
readonly map: HexM<Hex>;
|
|
1186
1212
|
readonly row: number;
|
|
1187
1213
|
readonly col: number;
|
|
1188
1214
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1189
1215
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1190
1216
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
1191
1217
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
1192
|
-
forEachLinkHex: (func: (hex:
|
|
1218
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
1193
1219
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
1194
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
1220
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
1195
1221
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
1196
1222
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1197
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
1198
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
1223
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1224
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1199
1225
|
radialDist: (hex: Hex) => number;
|
|
1200
1226
|
}>, row: number, col: number, name?: string | undefined) => void;
|
|
1201
1227
|
showText: (vis?: boolean) => void;
|
|
@@ -1205,7 +1231,7 @@ export declare class Table {
|
|
|
1205
1231
|
makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
|
|
1206
1232
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1207
1233
|
metricDist: (hex: Hex) => number;
|
|
1208
|
-
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir) => import("@thegraid/easeljs-module").Point;
|
|
1234
|
+
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
|
|
1209
1235
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
1210
1236
|
_tile: import("./tile").MapTile | undefined;
|
|
1211
1237
|
_meep: import("./meeple").Meeple | undefined;
|
|
@@ -1239,20 +1265,20 @@ export declare class Table {
|
|
|
1239
1265
|
_district: number | undefined;
|
|
1240
1266
|
readonly isOnMap: boolean;
|
|
1241
1267
|
_isLegal: boolean;
|
|
1242
|
-
readonly map:
|
|
1268
|
+
readonly map: HexM<Hex>;
|
|
1243
1269
|
readonly row: number;
|
|
1244
1270
|
readonly col: number;
|
|
1245
1271
|
readonly links: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1246
1272
|
metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
|
|
1247
1273
|
readonly linkDirs: import("./hex-intfs").HexDir[];
|
|
1248
1274
|
readonly linkHexes: (import("./hex").Hex2 | undefined)[];
|
|
1249
|
-
forEachLinkHex: (func: (hex:
|
|
1275
|
+
forEachLinkHex: (func: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: import("./hex").Hex2) => unknown, inclCenter?: boolean) => void;
|
|
1250
1276
|
findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
|
|
1251
|
-
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex:
|
|
1277
|
+
findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex").Hex2 | undefined;
|
|
1252
1278
|
hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
|
|
1253
1279
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1254
|
-
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) =>
|
|
1255
|
-
lastHex: (ds: import("./hex-intfs").HexDir) =>
|
|
1280
|
+
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1281
|
+
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1256
1282
|
radialDist: (hex: Hex) => number;
|
|
1257
1283
|
} | undefined): void;
|
|
1258
1284
|
/** Toggle dragging: dragTarget(target) OR stopDragging(targetHex)
|