@thegraid/hexlib 1.3.8 → 1.3.10
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/dist/game-play.d.ts +3 -1
- package/dist/game-play.d.ts.map +1 -1
- package/dist/game-play.js +6 -1
- package/dist/game-play.js.map +1 -1
- package/dist/game-setup.d.ts +1 -1
- package/dist/game-setup.js +2 -2
- package/dist/game-setup.js.map +1 -1
- package/dist/hex-intfs.d.ts +117 -51
- package/dist/hex-intfs.d.ts.map +1 -1
- package/dist/hex-intfs.js +80 -44
- package/dist/hex-intfs.js.map +1 -1
- package/dist/hex.d.ts +83 -78
- package/dist/hex.d.ts.map +1 -1
- package/dist/hex.js +97 -93
- package/dist/hex.js.map +1 -1
- package/dist/image-loader.d.ts +11 -5
- package/dist/image-loader.d.ts.map +1 -1
- package/dist/image-loader.js +16 -8
- package/dist/image-loader.js.map +1 -1
- package/dist/meeple.d.ts +3 -3
- package/dist/meeple.d.ts.map +1 -1
- package/dist/meeple.js +13 -13
- package/dist/meeple.js.map +1 -1
- package/dist/player-panel.js +4 -5
- package/dist/player-panel.js.map +1 -1
- package/dist/player.d.ts.map +1 -1
- package/dist/player.js +2 -1
- package/dist/player.js.map +1 -1
- package/dist/table.d.ts +124 -125
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +51 -79
- package/dist/table.js.map +1 -1
- package/dist/text-log.d.ts +8 -0
- package/dist/text-log.d.ts.map +1 -1
- package/dist/text-log.js +10 -1
- package/dist/text-log.js.map +1 -1
- package/dist/tile-source.d.ts.map +1 -1
- package/dist/tile-source.js +3 -2
- package/dist/tile-source.js.map +1 -1
- package/dist/tile.d.ts +36 -14
- package/dist/tile.d.ts.map +1 -1
- package/dist/tile.js +53 -27
- package/dist/tile.js.map +1 -1
- package/package.json +1 -1
package/dist/table.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { PlayerPanel } from "./player-panel";
|
|
|
12
12
|
import { HexShape } from "./shapes";
|
|
13
13
|
import { Tile } from "./tile";
|
|
14
14
|
import { TileSource } from "./tile-source";
|
|
15
|
+
import { TextLog } from "./text-log";
|
|
15
16
|
export interface Dragable {
|
|
16
17
|
dragFunc0(hex: IHex2, ctx: DragContext): void;
|
|
17
18
|
dropFunc0(hex: IHex2, ctx: DragContext): void;
|
|
@@ -30,27 +31,6 @@ export interface DragContext {
|
|
|
30
31
|
gameState: GameState;
|
|
31
32
|
phase?: string;
|
|
32
33
|
}
|
|
33
|
-
declare class TextLog extends NamedContainer {
|
|
34
|
-
size: number;
|
|
35
|
-
lead: number;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @param Aname
|
|
39
|
-
* @param nlines
|
|
40
|
-
* @param size fontSize [TP.hexRad/2]
|
|
41
|
-
* @param lead between lines [3]
|
|
42
|
-
*/
|
|
43
|
-
constructor(Aname: string, nlines?: number, size?: number, lead?: number);
|
|
44
|
-
lines: Text[];
|
|
45
|
-
lastLine: string;
|
|
46
|
-
nReps: number;
|
|
47
|
-
height(nLines?: number): number;
|
|
48
|
-
clear(): void;
|
|
49
|
-
private newText;
|
|
50
|
-
private spaceLines;
|
|
51
|
-
/** convert line to single-line; inc count if same line; insert & scroll up */
|
|
52
|
-
log(line: string, from?: string, toConsole?: boolean): string;
|
|
53
|
-
}
|
|
54
34
|
/** layout display components, setup callbacks to GamePlay.
|
|
55
35
|
*
|
|
56
36
|
* uses a HexMap\<IHex2\>
|
|
@@ -66,6 +46,7 @@ export declare class Table extends Dispatcher {
|
|
|
66
46
|
netGUI: ParamGUI;
|
|
67
47
|
/** initial visibility for toggleText */
|
|
68
48
|
initialVis: boolean;
|
|
49
|
+
/** scale to radius */
|
|
69
50
|
sr(v?: number): number;
|
|
70
51
|
undoCont: Container;
|
|
71
52
|
undoShape: Shape;
|
|
@@ -136,9 +117,9 @@ export declare class Table extends Dispatcher {
|
|
|
136
117
|
* @returns the new Hex2
|
|
137
118
|
*/
|
|
138
119
|
newHex2(row: number | undefined, col: number | undefined, name: string, claz?: Constructor<IHex2>): {
|
|
139
|
-
readonly implementsIHex2: true;
|
|
140
|
-
readonly cont: import("./hex").HexCont;
|
|
141
120
|
readonly radius: number;
|
|
121
|
+
readonly implementsIHex2: boolean;
|
|
122
|
+
readonly cont: import("./hex").HexCont;
|
|
142
123
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
143
124
|
readonly mapCont: import("./hex").MapCont;
|
|
144
125
|
readonly markCont: Container;
|
|
@@ -151,9 +132,9 @@ export declare class Table extends Dispatcher {
|
|
|
151
132
|
distText: Text;
|
|
152
133
|
rcText: Text;
|
|
153
134
|
constructorCode: (map: HexM<{
|
|
154
|
-
readonly implementsIHex2: true;
|
|
155
|
-
readonly cont: import("./hex").HexCont;
|
|
156
135
|
readonly radius: number;
|
|
136
|
+
readonly implementsIHex2: boolean;
|
|
137
|
+
readonly cont: import("./hex").HexCont;
|
|
157
138
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
158
139
|
readonly mapCont: import("./hex").MapCont;
|
|
159
140
|
readonly markCont: Container;
|
|
@@ -176,7 +157,10 @@ export declare class Table extends Dispatcher {
|
|
|
176
157
|
reCache: (scale?: number) => void;
|
|
177
158
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
178
159
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
179
|
-
|
|
160
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
161
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
162
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
163
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
180
164
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
181
165
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
182
166
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -189,8 +173,6 @@ export declare class Table extends Dispatcher {
|
|
|
189
173
|
rcspString: (color?: string) => string;
|
|
190
174
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
191
175
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
192
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
193
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
194
176
|
Aname: string;
|
|
195
177
|
readonly iHex: IdHex;
|
|
196
178
|
readonly rcs: string;
|
|
@@ -216,7 +198,6 @@ export declare class Table extends Dispatcher {
|
|
|
216
198
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
217
199
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
218
200
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
219
|
-
radialDist: (hex: Hex) => number;
|
|
220
201
|
}>, row: number, col: number, dText?: string) => void;
|
|
221
202
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
222
203
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -228,7 +209,10 @@ export declare class Table extends Dispatcher {
|
|
|
228
209
|
reCache: (scale?: number) => void;
|
|
229
210
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
230
211
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
231
|
-
|
|
212
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
213
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
214
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
215
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
232
216
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
233
217
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
234
218
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -241,8 +225,6 @@ export declare class Table extends Dispatcher {
|
|
|
241
225
|
rcspString: (color?: string) => string;
|
|
242
226
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
243
227
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
244
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
245
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
246
228
|
Aname: string;
|
|
247
229
|
readonly iHex: IdHex;
|
|
248
230
|
readonly rcs: string;
|
|
@@ -268,13 +250,12 @@ export declare class Table extends Dispatcher {
|
|
|
268
250
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
269
251
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
270
252
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
271
|
-
radialDist: (hex: Hex) => number;
|
|
272
253
|
};
|
|
273
|
-
/** if hextowns
|
|
254
|
+
/** if hextowns wants the half-row offset, they can override as follows: */
|
|
274
255
|
newHex2a(row: number | undefined, col: number | undefined, name: string, claz?: Constructor<IHex2>, sy?: number): {
|
|
275
|
-
readonly implementsIHex2: true;
|
|
276
|
-
readonly cont: import("./hex").HexCont;
|
|
277
256
|
readonly radius: number;
|
|
257
|
+
readonly implementsIHex2: boolean;
|
|
258
|
+
readonly cont: import("./hex").HexCont;
|
|
278
259
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
279
260
|
readonly mapCont: import("./hex").MapCont;
|
|
280
261
|
readonly markCont: Container;
|
|
@@ -287,9 +268,9 @@ export declare class Table extends Dispatcher {
|
|
|
287
268
|
distText: Text;
|
|
288
269
|
rcText: Text;
|
|
289
270
|
constructorCode: (map: HexM<{
|
|
290
|
-
readonly implementsIHex2: true;
|
|
291
|
-
readonly cont: import("./hex").HexCont;
|
|
292
271
|
readonly radius: number;
|
|
272
|
+
readonly implementsIHex2: boolean;
|
|
273
|
+
readonly cont: import("./hex").HexCont;
|
|
293
274
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
294
275
|
readonly mapCont: import("./hex").MapCont;
|
|
295
276
|
readonly markCont: Container;
|
|
@@ -312,7 +293,10 @@ export declare class Table extends Dispatcher {
|
|
|
312
293
|
reCache: (scale?: number) => void;
|
|
313
294
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
314
295
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
315
|
-
|
|
296
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
297
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
298
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
299
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
316
300
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
317
301
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
318
302
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -325,8 +309,6 @@ export declare class Table extends Dispatcher {
|
|
|
325
309
|
rcspString: (color?: string) => string;
|
|
326
310
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
327
311
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
328
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
329
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
330
312
|
Aname: string;
|
|
331
313
|
readonly iHex: IdHex;
|
|
332
314
|
readonly rcs: string;
|
|
@@ -352,7 +334,6 @@ export declare class Table extends Dispatcher {
|
|
|
352
334
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
353
335
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
354
336
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
355
|
-
radialDist: (hex: Hex) => number;
|
|
356
337
|
}>, row: number, col: number, dText?: string) => void;
|
|
357
338
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
358
339
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -364,7 +345,10 @@ export declare class Table extends Dispatcher {
|
|
|
364
345
|
reCache: (scale?: number) => void;
|
|
365
346
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
366
347
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
367
|
-
|
|
348
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
349
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
350
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
351
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
368
352
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
369
353
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
370
354
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -377,8 +361,6 @@ export declare class Table extends Dispatcher {
|
|
|
377
361
|
rcspString: (color?: string) => string;
|
|
378
362
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
379
363
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
380
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
381
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
382
364
|
Aname: string;
|
|
383
365
|
readonly iHex: IdHex;
|
|
384
366
|
readonly rcs: string;
|
|
@@ -404,10 +386,9 @@ export declare class Table extends Dispatcher {
|
|
|
404
386
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
405
387
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
406
388
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
407
|
-
radialDist: (hex: Hex) => number;
|
|
408
389
|
};
|
|
409
390
|
/**
|
|
410
|
-
* all
|
|
391
|
+
* all numbers in units of dxdc or dydr
|
|
411
392
|
* @param x0 frame left [-1]; relative to scaleCont (offset from bgRect to hexCont)
|
|
412
393
|
* @param y0 frame top [.5]; relative to scaleCont
|
|
413
394
|
* @param w0 pad width [10]; width of bgRect, beyond hexCont, centered on hexCont
|
|
@@ -501,6 +482,7 @@ export declare class Table extends Dispatcher {
|
|
|
501
482
|
/** move cont to metric [row, col] of hexCont
|
|
502
483
|
*
|
|
503
484
|
* see also: HexMap.xyFromMap(target, row, col)
|
|
485
|
+
* @param cont could be the HexCont of a UnitSourceHex or a panel or ...
|
|
504
486
|
*/
|
|
505
487
|
setToRowCol(cont: Container, row?: number, col?: number, hexCont?: Container): void;
|
|
506
488
|
/** display source [and legalMark] on given hex [Ankh] */
|
|
@@ -526,9 +508,9 @@ export declare class Table extends Dispatcher {
|
|
|
526
508
|
vis?: boolean;
|
|
527
509
|
gap?: number;
|
|
528
510
|
}): {
|
|
529
|
-
readonly implementsIHex2: true;
|
|
530
|
-
readonly cont: import("./hex").HexCont;
|
|
531
511
|
readonly radius: number;
|
|
512
|
+
readonly implementsIHex2: boolean;
|
|
513
|
+
readonly cont: import("./hex").HexCont;
|
|
532
514
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
533
515
|
readonly mapCont: import("./hex").MapCont;
|
|
534
516
|
readonly markCont: Container;
|
|
@@ -541,9 +523,9 @@ export declare class Table extends Dispatcher {
|
|
|
541
523
|
distText: Text;
|
|
542
524
|
rcText: Text;
|
|
543
525
|
constructorCode: (map: HexM<{
|
|
544
|
-
readonly implementsIHex2: true;
|
|
545
|
-
readonly cont: import("./hex").HexCont;
|
|
546
526
|
readonly radius: number;
|
|
527
|
+
readonly implementsIHex2: boolean;
|
|
528
|
+
readonly cont: import("./hex").HexCont;
|
|
547
529
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
548
530
|
readonly mapCont: import("./hex").MapCont;
|
|
549
531
|
readonly markCont: Container;
|
|
@@ -566,7 +548,10 @@ export declare class Table extends Dispatcher {
|
|
|
566
548
|
reCache: (scale?: number) => void;
|
|
567
549
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
568
550
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
569
|
-
|
|
551
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
552
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
553
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
554
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
570
555
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
571
556
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
572
557
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -579,8 +564,6 @@ export declare class Table extends Dispatcher {
|
|
|
579
564
|
rcspString: (color?: string) => string;
|
|
580
565
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
581
566
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
582
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
583
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
584
567
|
Aname: string;
|
|
585
568
|
readonly iHex: IdHex;
|
|
586
569
|
readonly rcs: string;
|
|
@@ -606,7 +589,6 @@ export declare class Table extends Dispatcher {
|
|
|
606
589
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
607
590
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
608
591
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
609
|
-
radialDist: (hex: Hex) => number;
|
|
610
592
|
}>, row: number, col: number, dText?: string) => void;
|
|
611
593
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
612
594
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -618,7 +600,10 @@ export declare class Table extends Dispatcher {
|
|
|
618
600
|
reCache: (scale?: number) => void;
|
|
619
601
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
620
602
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
621
|
-
|
|
603
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
604
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
605
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
606
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
622
607
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
623
608
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
624
609
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -631,8 +616,6 @@ export declare class Table extends Dispatcher {
|
|
|
631
616
|
rcspString: (color?: string) => string;
|
|
632
617
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
633
618
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
634
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
635
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
636
619
|
Aname: string;
|
|
637
620
|
readonly iHex: IdHex;
|
|
638
621
|
readonly rcs: string;
|
|
@@ -658,10 +641,9 @@ export declare class Table extends Dispatcher {
|
|
|
658
641
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
659
642
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
660
643
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
661
|
-
radialDist: (hex: Hex) => number;
|
|
662
644
|
}[];
|
|
663
645
|
/**
|
|
664
|
-
*
|
|
646
|
+
* newHex2(row, col, name, claz) with the ${name} image on top. [legacy from hextowns]
|
|
665
647
|
*
|
|
666
648
|
* Typically: invoke from layoutTable() or layoutTable2()
|
|
667
649
|
* @param row [TP.nHexes + 3.2] below the centerline
|
|
@@ -671,9 +653,9 @@ export declare class Table extends Dispatcher {
|
|
|
671
653
|
* @returns
|
|
672
654
|
*/
|
|
673
655
|
makeRecycleHex(row?: number, col?: number, name?: string, claz?: typeof RecycleHex): {
|
|
674
|
-
readonly implementsIHex2: true;
|
|
675
|
-
readonly cont: import("./hex").HexCont;
|
|
676
656
|
readonly radius: number;
|
|
657
|
+
readonly implementsIHex2: boolean;
|
|
658
|
+
readonly cont: import("./hex").HexCont;
|
|
677
659
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
678
660
|
readonly mapCont: import("./hex").MapCont;
|
|
679
661
|
readonly markCont: Container;
|
|
@@ -686,9 +668,9 @@ export declare class Table extends Dispatcher {
|
|
|
686
668
|
distText: Text;
|
|
687
669
|
rcText: Text;
|
|
688
670
|
constructorCode: (map: HexM<{
|
|
689
|
-
readonly implementsIHex2: true;
|
|
690
|
-
readonly cont: import("./hex").HexCont;
|
|
691
671
|
readonly radius: number;
|
|
672
|
+
readonly implementsIHex2: boolean;
|
|
673
|
+
readonly cont: import("./hex").HexCont;
|
|
692
674
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
693
675
|
readonly mapCont: import("./hex").MapCont;
|
|
694
676
|
readonly markCont: Container;
|
|
@@ -711,7 +693,10 @@ export declare class Table extends Dispatcher {
|
|
|
711
693
|
reCache: (scale?: number) => void;
|
|
712
694
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
713
695
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
714
|
-
|
|
696
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
697
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
698
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
699
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
715
700
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
716
701
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
717
702
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -724,8 +709,6 @@ export declare class Table extends Dispatcher {
|
|
|
724
709
|
rcspString: (color?: string) => string;
|
|
725
710
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
726
711
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
727
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
728
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
729
712
|
Aname: string;
|
|
730
713
|
readonly iHex: IdHex;
|
|
731
714
|
readonly rcs: string;
|
|
@@ -751,7 +734,6 @@ export declare class Table extends Dispatcher {
|
|
|
751
734
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
752
735
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
753
736
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
754
|
-
radialDist: (hex: Hex) => number;
|
|
755
737
|
}>, row: number, col: number, dText?: string) => void;
|
|
756
738
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
757
739
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -763,7 +745,10 @@ export declare class Table extends Dispatcher {
|
|
|
763
745
|
reCache: (scale?: number) => void;
|
|
764
746
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
765
747
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
766
|
-
|
|
748
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
749
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
750
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
751
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
767
752
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
768
753
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
769
754
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -776,8 +761,6 @@ export declare class Table extends Dispatcher {
|
|
|
776
761
|
rcspString: (color?: string) => string;
|
|
777
762
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
778
763
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
779
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
780
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
781
764
|
Aname: string;
|
|
782
765
|
readonly iHex: IdHex;
|
|
783
766
|
readonly rcs: string;
|
|
@@ -803,7 +786,6 @@ export declare class Table extends Dispatcher {
|
|
|
803
786
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
804
787
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
805
788
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
806
|
-
radialDist: (hex: Hex) => number;
|
|
807
789
|
};
|
|
808
790
|
/** Params that affect the rules of the game & board
|
|
809
791
|
*
|
|
@@ -820,20 +802,30 @@ export declare class Table extends Dispatcher {
|
|
|
820
802
|
makeNetworkGUI(parent: Container, x?: number, y?: number): ParamGUI;
|
|
821
803
|
showNetworkGroup(group_name?: string): void;
|
|
822
804
|
doneButton: UtilButton;
|
|
823
|
-
doneClicked
|
|
805
|
+
doneClicked(evt?: any, data?: any): void;
|
|
824
806
|
/**
|
|
825
|
-
*
|
|
807
|
+
* Add a [singleton] DoneButton to the given panel/Container.
|
|
808
|
+
* - Single instance: change text, color and even location
|
|
809
|
+
* - still invokes the same onClick callback
|
|
810
|
+
*
|
|
811
|
+
* Modal button to end current phase and proceed to the next.
|
|
812
|
+
*
|
|
813
|
+
* cont._doneListener: S.click invokes this.doneClicked(evt, data);
|
|
814
|
+
* - you can add & manage additional listeners
|
|
815
|
+
* - addDoneButton() to *same* cont removes previous _doneListener.
|
|
826
816
|
*
|
|
827
817
|
* May be contained or placed with ActionSelection buttons [ankh].
|
|
828
818
|
*
|
|
829
|
-
* textColor is BLACK or WHITE to contrast with paint(color)
|
|
830
|
-
*
|
|
819
|
+
* UtilButton: textColor is BLACK or WHITE to contrast with button.paint(color)
|
|
820
|
+
*
|
|
821
|
+
* @param cont [scaleCont] a Container to hold the DoneButton (& _doneListener)
|
|
831
822
|
* @param cx [0] offset in Container (to 'center', 'left', 'right' per align)
|
|
832
823
|
* @param cy [0] offset in Container (to top of text box)
|
|
833
824
|
* @param align ['center'] 'left' or 'right' for textAlign
|
|
825
|
+
* @param data included in callback to doneClicked(evt, data)
|
|
834
826
|
* @returns this.doneButton
|
|
835
827
|
*/
|
|
836
|
-
addDoneButton(cont?: Container, cx?: number, cy?: number, align?: string): UtilButton;
|
|
828
|
+
addDoneButton(cont?: Container, cx?: number, cy?: number, align?: string, data?: any): UtilButton;
|
|
837
829
|
/** show player player score on table */
|
|
838
830
|
setPlayerScore(plyr: Player, score?: number, rank?: number): void;
|
|
839
831
|
/** update table when a new Game is started.
|
|
@@ -849,9 +841,9 @@ export declare class Table extends Dispatcher {
|
|
|
849
841
|
*/
|
|
850
842
|
makeDragable(tile: Tile): void;
|
|
851
843
|
hexUnderObj(dragObj: DisplayObject, legalOnly?: boolean): {
|
|
852
|
-
readonly implementsIHex2: true;
|
|
853
|
-
readonly cont: import("./hex").HexCont;
|
|
854
844
|
readonly radius: number;
|
|
845
|
+
readonly implementsIHex2: boolean;
|
|
846
|
+
readonly cont: import("./hex").HexCont;
|
|
855
847
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
856
848
|
readonly mapCont: import("./hex").MapCont;
|
|
857
849
|
readonly markCont: Container;
|
|
@@ -864,9 +856,9 @@ export declare class Table extends Dispatcher {
|
|
|
864
856
|
distText: Text;
|
|
865
857
|
rcText: Text;
|
|
866
858
|
constructorCode: (map: HexM<{
|
|
867
|
-
readonly implementsIHex2: true;
|
|
868
|
-
readonly cont: import("./hex").HexCont;
|
|
869
859
|
readonly radius: number;
|
|
860
|
+
readonly implementsIHex2: boolean;
|
|
861
|
+
readonly cont: import("./hex").HexCont;
|
|
870
862
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
871
863
|
readonly mapCont: import("./hex").MapCont;
|
|
872
864
|
readonly markCont: Container;
|
|
@@ -889,7 +881,10 @@ export declare class Table extends Dispatcher {
|
|
|
889
881
|
reCache: (scale?: number) => void;
|
|
890
882
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
891
883
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
892
|
-
|
|
884
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
885
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
886
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
887
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
893
888
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
894
889
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
895
890
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -902,8 +897,6 @@ export declare class Table extends Dispatcher {
|
|
|
902
897
|
rcspString: (color?: string) => string;
|
|
903
898
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
904
899
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
905
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
906
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
907
900
|
Aname: string;
|
|
908
901
|
readonly iHex: IdHex;
|
|
909
902
|
readonly rcs: string;
|
|
@@ -929,7 +922,6 @@ export declare class Table extends Dispatcher {
|
|
|
929
922
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
930
923
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
931
924
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
932
|
-
radialDist: (hex: Hex) => number;
|
|
933
925
|
}>, row: number, col: number, dText?: string) => void;
|
|
934
926
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
935
927
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -941,7 +933,10 @@ export declare class Table extends Dispatcher {
|
|
|
941
933
|
reCache: (scale?: number) => void;
|
|
942
934
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
943
935
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
944
|
-
|
|
936
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
937
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
938
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
939
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
945
940
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
946
941
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
947
942
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -954,8 +949,6 @@ export declare class Table extends Dispatcher {
|
|
|
954
949
|
rcspString: (color?: string) => string;
|
|
955
950
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
956
951
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
957
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
958
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
959
952
|
Aname: string;
|
|
960
953
|
readonly iHex: IdHex;
|
|
961
954
|
readonly rcs: string;
|
|
@@ -981,7 +974,6 @@ export declare class Table extends Dispatcher {
|
|
|
981
974
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
982
975
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
983
976
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
984
|
-
radialDist: (hex: Hex) => number;
|
|
985
977
|
} | undefined;
|
|
986
978
|
dragContext: DragContext;
|
|
987
979
|
/** Direct callback from this.dragger. Invoke this.dragFunc0(tile, info, hexUnderTile) */
|
|
@@ -996,9 +988,9 @@ export declare class Table extends Dispatcher {
|
|
|
996
988
|
* @param hex the IHex2 which tile is currently over (may be undefined or off map)
|
|
997
989
|
*/
|
|
998
990
|
dragFunc0(tile: Tile, info?: DragInfo, hex?: {
|
|
999
|
-
readonly implementsIHex2: true;
|
|
1000
|
-
readonly cont: import("./hex").HexCont;
|
|
1001
991
|
readonly radius: number;
|
|
992
|
+
readonly implementsIHex2: boolean;
|
|
993
|
+
readonly cont: import("./hex").HexCont;
|
|
1002
994
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
1003
995
|
readonly mapCont: import("./hex").MapCont;
|
|
1004
996
|
readonly markCont: Container;
|
|
@@ -1011,9 +1003,9 @@ export declare class Table extends Dispatcher {
|
|
|
1011
1003
|
distText: Text;
|
|
1012
1004
|
rcText: Text;
|
|
1013
1005
|
constructorCode: (map: HexM<{
|
|
1014
|
-
readonly implementsIHex2: true;
|
|
1015
|
-
readonly cont: import("./hex").HexCont;
|
|
1016
1006
|
readonly radius: number;
|
|
1007
|
+
readonly implementsIHex2: boolean;
|
|
1008
|
+
readonly cont: import("./hex").HexCont;
|
|
1017
1009
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
1018
1010
|
readonly mapCont: import("./hex").MapCont;
|
|
1019
1011
|
readonly markCont: Container;
|
|
@@ -1036,7 +1028,10 @@ export declare class Table extends Dispatcher {
|
|
|
1036
1028
|
reCache: (scale?: number) => void;
|
|
1037
1029
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
1038
1030
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1039
|
-
|
|
1031
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1032
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1033
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
1034
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
1040
1035
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1041
1036
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1042
1037
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -1049,8 +1044,6 @@ export declare class Table extends Dispatcher {
|
|
|
1049
1044
|
rcspString: (color?: string) => string;
|
|
1050
1045
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
1051
1046
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
1052
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1053
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1054
1047
|
Aname: string;
|
|
1055
1048
|
readonly iHex: IdHex;
|
|
1056
1049
|
readonly rcs: string;
|
|
@@ -1076,7 +1069,6 @@ export declare class Table extends Dispatcher {
|
|
|
1076
1069
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1077
1070
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1078
1071
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1079
|
-
radialDist: (hex: Hex) => number;
|
|
1080
1072
|
}>, row: number, col: number, dText?: string) => void;
|
|
1081
1073
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
1082
1074
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -1088,7 +1080,10 @@ export declare class Table extends Dispatcher {
|
|
|
1088
1080
|
reCache: (scale?: number) => void;
|
|
1089
1081
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
1090
1082
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1091
|
-
|
|
1083
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1084
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1085
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
1086
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
1092
1087
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1093
1088
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1094
1089
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -1101,8 +1096,6 @@ export declare class Table extends Dispatcher {
|
|
|
1101
1096
|
rcspString: (color?: string) => string;
|
|
1102
1097
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
1103
1098
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
1104
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1105
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1106
1099
|
Aname: string;
|
|
1107
1100
|
readonly iHex: IdHex;
|
|
1108
1101
|
readonly rcs: string;
|
|
@@ -1128,7 +1121,6 @@ export declare class Table extends Dispatcher {
|
|
|
1128
1121
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1129
1122
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1130
1123
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1131
|
-
radialDist: (hex: Hex) => number;
|
|
1132
1124
|
} | undefined): void;
|
|
1133
1125
|
/** invoke dragShift callback if shift state changes */
|
|
1134
1126
|
checkShift(hex: IHex2 | undefined, ctx: DragContext): void;
|
|
@@ -1148,6 +1140,13 @@ export declare class Table extends Dispatcher {
|
|
|
1148
1140
|
* @param ctx DragContext with shift/ctrl from table.dragFunc0()
|
|
1149
1141
|
*/
|
|
1150
1142
|
dragStart(tile: Tile, ctx: DragContext): void;
|
|
1143
|
+
/**
|
|
1144
|
+
* explain reason why dragStart cantBeMovedBy(curPlayer, ctx)
|
|
1145
|
+
* @param tile
|
|
1146
|
+
* @param ctx
|
|
1147
|
+
* @param reason as returned from cantBeMovedBy()
|
|
1148
|
+
*/
|
|
1149
|
+
explainReason(tile: Tile, ctx: DragContext, reason?: string | boolean): void;
|
|
1151
1150
|
/** invoked during dragStart(tile, ctx)
|
|
1152
1151
|
*
|
|
1153
1152
|
* set hex.isLegal = v ==> hex.legalMark.visible = v
|
|
@@ -1159,9 +1158,9 @@ export declare class Table extends Dispatcher {
|
|
|
1159
1158
|
dragShift(tile: Tile | undefined, shiftKey: boolean | undefined, ctx: DragContext): void;
|
|
1160
1159
|
/** dropFunc for each Dragable/Tile -> tile.dropFunc0(hex, ctx) */
|
|
1161
1160
|
dropFunc(dobj: DisplayObject, info?: DragInfo, hex?: {
|
|
1162
|
-
readonly implementsIHex2: true;
|
|
1163
|
-
readonly cont: import("./hex").HexCont;
|
|
1164
1161
|
readonly radius: number;
|
|
1162
|
+
readonly implementsIHex2: boolean;
|
|
1163
|
+
readonly cont: import("./hex").HexCont;
|
|
1165
1164
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
1166
1165
|
readonly mapCont: import("./hex").MapCont;
|
|
1167
1166
|
readonly markCont: Container;
|
|
@@ -1174,9 +1173,9 @@ export declare class Table extends Dispatcher {
|
|
|
1174
1173
|
distText: Text;
|
|
1175
1174
|
rcText: Text;
|
|
1176
1175
|
constructorCode: (map: HexM<{
|
|
1177
|
-
readonly implementsIHex2: true;
|
|
1178
|
-
readonly cont: import("./hex").HexCont;
|
|
1179
1176
|
readonly radius: number;
|
|
1177
|
+
readonly implementsIHex2: boolean;
|
|
1178
|
+
readonly cont: import("./hex").HexCont;
|
|
1180
1179
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
1181
1180
|
readonly mapCont: import("./hex").MapCont;
|
|
1182
1181
|
readonly markCont: Container;
|
|
@@ -1199,7 +1198,10 @@ export declare class Table extends Dispatcher {
|
|
|
1199
1198
|
reCache: (scale?: number) => void;
|
|
1200
1199
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
1201
1200
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1202
|
-
|
|
1201
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1202
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1203
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
1204
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
1203
1205
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1204
1206
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1205
1207
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -1212,8 +1214,6 @@ export declare class Table extends Dispatcher {
|
|
|
1212
1214
|
rcspString: (color?: string) => string;
|
|
1213
1215
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
1214
1216
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
1215
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1216
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1217
1217
|
Aname: string;
|
|
1218
1218
|
readonly iHex: IdHex;
|
|
1219
1219
|
readonly rcs: string;
|
|
@@ -1239,7 +1239,6 @@ export declare class Table extends Dispatcher {
|
|
|
1239
1239
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1240
1240
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1241
1241
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1242
|
-
radialDist: (hex: Hex) => number;
|
|
1243
1242
|
}>, row: number, col: number, dText?: string) => void;
|
|
1244
1243
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
1245
1244
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -1251,7 +1250,10 @@ export declare class Table extends Dispatcher {
|
|
|
1251
1250
|
reCache: (scale?: number) => void;
|
|
1252
1251
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
1253
1252
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1254
|
-
|
|
1253
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1254
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1255
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
1256
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
1255
1257
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1256
1258
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1257
1259
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -1264,8 +1266,6 @@ export declare class Table extends Dispatcher {
|
|
|
1264
1266
|
rcspString: (color?: string) => string;
|
|
1265
1267
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
1266
1268
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
1267
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1268
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1269
1269
|
Aname: string;
|
|
1270
1270
|
readonly iHex: IdHex;
|
|
1271
1271
|
readonly rcs: string;
|
|
@@ -1291,7 +1291,6 @@ export declare class Table extends Dispatcher {
|
|
|
1291
1291
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1292
1292
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1293
1293
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1294
|
-
radialDist: (hex: Hex) => number;
|
|
1295
1294
|
} | undefined): void;
|
|
1296
1295
|
/** synthesize dragStart(tile), tile.dragFunc0(hex), dropFunc(tile); */
|
|
1297
1296
|
dragStartAndDrop(tile: Tile, toHex: Hex): void;
|
|
@@ -1303,9 +1302,9 @@ export declare class Table extends Dispatcher {
|
|
|
1303
1302
|
* @param targetHex where to drop Tile [this.dragContext.tile.fromHex]
|
|
1304
1303
|
*/
|
|
1305
1304
|
stopDragging(targetHex?: {
|
|
1306
|
-
readonly implementsIHex2: true;
|
|
1307
|
-
readonly cont: import("./hex").HexCont;
|
|
1308
1305
|
readonly radius: number;
|
|
1306
|
+
readonly implementsIHex2: boolean;
|
|
1307
|
+
readonly cont: import("./hex").HexCont;
|
|
1309
1308
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
1310
1309
|
readonly mapCont: import("./hex").MapCont;
|
|
1311
1310
|
readonly markCont: Container;
|
|
@@ -1318,9 +1317,9 @@ export declare class Table extends Dispatcher {
|
|
|
1318
1317
|
distText: Text;
|
|
1319
1318
|
rcText: Text;
|
|
1320
1319
|
constructorCode: (map: HexM<{
|
|
1321
|
-
readonly implementsIHex2: true;
|
|
1322
|
-
readonly cont: import("./hex").HexCont;
|
|
1323
1320
|
readonly radius: number;
|
|
1321
|
+
readonly implementsIHex2: boolean;
|
|
1322
|
+
readonly cont: import("./hex").HexCont;
|
|
1324
1323
|
readonly hexShape: import("@thegraid/easeljs-lib").Paintable;
|
|
1325
1324
|
readonly mapCont: import("./hex").MapCont;
|
|
1326
1325
|
readonly markCont: Container;
|
|
@@ -1343,7 +1342,10 @@ export declare class Table extends Dispatcher {
|
|
|
1343
1342
|
reCache: (scale?: number) => void;
|
|
1344
1343
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
1345
1344
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1346
|
-
|
|
1345
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1346
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1347
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
1348
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
1347
1349
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1348
1350
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1349
1351
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -1356,8 +1358,6 @@ export declare class Table extends Dispatcher {
|
|
|
1356
1358
|
rcspString: (color?: string) => string;
|
|
1357
1359
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
1358
1360
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
1359
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1360
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1361
1361
|
Aname: string;
|
|
1362
1362
|
readonly iHex: IdHex;
|
|
1363
1363
|
readonly rcs: string;
|
|
@@ -1383,7 +1383,6 @@ export declare class Table extends Dispatcher {
|
|
|
1383
1383
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1384
1384
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1385
1385
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1386
|
-
radialDist: (hex: Hex) => number;
|
|
1387
1386
|
}>, row: number, col: number, dText?: string) => void;
|
|
1388
1387
|
setRcText: (row: number, col: number, rcf?: number) => void;
|
|
1389
1388
|
setDistText: (dText?: string, size?: number) => void;
|
|
@@ -1395,7 +1394,10 @@ export declare class Table extends Dispatcher {
|
|
|
1395
1394
|
reCache: (scale?: number) => void;
|
|
1396
1395
|
makeHexShape: (colorn?: string) => import("@thegraid/easeljs-lib").Paintable;
|
|
1397
1396
|
setHexColor: (color: string, district?: number | undefined) => void;
|
|
1398
|
-
|
|
1397
|
+
xywh: (radius?: number, topo?: import("./hex-intfs").TopoC<Partial<Record<import("./hex-intfs").HexDir, import("./hex-intfs").DCR>>, import("./hex-intfs").HexDir>, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1398
|
+
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1399
|
+
radialDist: (hex: import("./hex").Hex2) => number;
|
|
1400
|
+
metricDist: (hex: import("./hex").Hex2) => number;
|
|
1399
1401
|
cornerXY: (dir: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1400
1402
|
cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, rad?: number, point?: import("@thegraid/easeljs-module").Point) => import("@thegraid/easeljs-module").Point;
|
|
1401
1403
|
edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
|
|
@@ -1408,8 +1410,6 @@ export declare class Table extends Dispatcher {
|
|
|
1408
1410
|
rcspString: (color?: string) => string;
|
|
1409
1411
|
setUnit: (unit?: Tile | undefined, isMeep?: boolean | undefined) => void;
|
|
1410
1412
|
unitCollision: (this_unit: Tile, unit: Tile, isMeep?: boolean) => void;
|
|
1411
|
-
xywh: (radius?: number, topo?: import("./hex-intfs").TopoMetric | undefined, row?: number, col?: number) => import("./hex-intfs").TopoXYWH;
|
|
1412
|
-
readonly xywh0: import("./hex-intfs").TopoXYWH;
|
|
1413
1413
|
Aname: string;
|
|
1414
1414
|
readonly iHex: IdHex;
|
|
1415
1415
|
readonly rcs: string;
|
|
@@ -1435,7 +1435,6 @@ export declare class Table extends Dispatcher {
|
|
|
1435
1435
|
forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
|
|
1436
1436
|
nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => import("./hex").Hex2 | undefined;
|
|
1437
1437
|
lastHex: (ds: import("./hex-intfs").HexDir) => import("./hex").Hex2;
|
|
1438
|
-
radialDist: (hex: Hex) => number;
|
|
1439
1438
|
} | undefined): void;
|
|
1440
1439
|
/**
|
|
1441
1440
|
* if (isDragging) stopDragging(targetHex); else startDragging(dragObj);
|