@thegraid/hexlib 1.0.14 → 1.1.3

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.
Files changed (47) hide show
  1. package/README.md +3 -0
  2. package/dist/game-play.d.ts +8 -15
  3. package/dist/game-play.d.ts.map +1 -1
  4. package/dist/game-play.js +12 -19
  5. package/dist/game-play.js.map +1 -1
  6. package/dist/game-setup.d.ts +44 -19
  7. package/dist/game-setup.d.ts.map +1 -1
  8. package/dist/game-setup.js +71 -35
  9. package/dist/game-setup.js.map +1 -1
  10. package/dist/hex-intfs.d.ts +2 -1
  11. package/dist/hex-intfs.d.ts.map +1 -1
  12. package/dist/hex-intfs.js +14 -13
  13. package/dist/hex-intfs.js.map +1 -1
  14. package/dist/hex.d.ts +209 -97
  15. package/dist/hex.d.ts.map +1 -1
  16. package/dist/hex.js +223 -193
  17. package/dist/hex.js.map +1 -1
  18. package/dist/meeple.d.ts +10 -8
  19. package/dist/meeple.d.ts.map +1 -1
  20. package/dist/meeple.js +12 -20
  21. package/dist/meeple.js.map +1 -1
  22. package/dist/plan-proxy.d.ts.map +1 -1
  23. package/dist/plan-proxy.js +4 -4
  24. package/dist/scenario-parser.d.ts +3 -2
  25. package/dist/scenario-parser.d.ts.map +1 -1
  26. package/dist/scenario-parser.js +2 -2
  27. package/dist/scenario-parser.js.map +1 -1
  28. package/dist/shapes.d.ts +5 -5
  29. package/dist/shapes.d.ts.map +1 -1
  30. package/dist/shapes.js +2 -2
  31. package/dist/shapes.js.map +1 -1
  32. package/dist/stream-writer.js +3 -3
  33. package/dist/table-params.d.ts.map +1 -1
  34. package/dist/table-params.js +1 -1
  35. package/dist/table-params.js.map +1 -1
  36. package/dist/table.d.ts +1109 -21
  37. package/dist/table.d.ts.map +1 -1
  38. package/dist/table.js +72 -38
  39. package/dist/table.js.map +1 -1
  40. package/dist/tile-source.d.ts +3 -3
  41. package/dist/tile-source.d.ts.map +1 -1
  42. package/dist/tile-source.js.map +1 -1
  43. package/dist/tile.d.ts +71 -23
  44. package/dist/tile.d.ts.map +1 -1
  45. package/dist/tile.js +77 -21
  46. package/dist/tile.js.map +1 -1
  47. package/package.json +2 -2
package/dist/table.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /// <reference types="easeljs" />
2
2
  /// <reference types="createjs-lib" />
3
+ /// <reference types="@thegraid/easeljs-lib/dist/createjs-functions" />
3
4
  import { Constructor, Dragger, DragInfo, DropdownStyle, ParamGUI, ScaleableContainer, XY } from "@thegraid/easeljs-lib";
4
5
  import { Container, DisplayObject, EventDispatcher, Shape, Stage, Text } from "@thegraid/easeljs-module";
5
6
  import { NamedContainer, NamedObject, type GamePlay } from "./game-play";
6
7
  import { Scenario } from "./game-setup";
7
8
  import type { GameState } from "./game-state";
8
- import { Hex, Hex2, HexMap, IdHex } from "./hex";
9
+ import { Hex, IHex2, HexMap, IdHex, RecycleHex } from "./hex";
9
10
  import { XYWH } from "./hex-intfs";
10
11
  import { Player } from "./player";
11
12
  import { PlayerPanel } from "./player-panel";
@@ -20,15 +21,15 @@ export interface ActionButton extends Container {
20
21
  rollover?: ((b: ActionButton, over: boolean) => void);
21
22
  }
22
23
  export interface Dragable {
23
- dragFunc0(hex: Hex2, ctx: DragContext): void;
24
- dropFunc0(hex: Hex2, ctx: DragContext): void;
24
+ dragFunc0(hex: IHex2, ctx: DragContext): void;
25
+ dropFunc0(hex: IHex2, ctx: DragContext): void;
25
26
  }
26
27
  /** to own file... */
27
28
  declare class TablePlanner {
28
29
  constructor(gamePlay: GamePlay);
29
30
  }
30
31
  export interface DragContext {
31
- targetHex: Hex2;
32
+ targetHex: IHex2;
32
33
  lastShift?: boolean;
33
34
  lastCtrl?: boolean;
34
35
  info: DragInfo;
@@ -50,7 +51,10 @@ declare class TextLog extends NamedContainer {
50
51
  private spaceLines;
51
52
  log(line: string, from?: string, toConsole?: boolean): string;
52
53
  }
53
- /** layout display components, setup callbacks to GamePlay */
54
+ /** layout display components, setup callbacks to GamePlay.
55
+ *
56
+ * uses a HexMap\<IHex2\>
57
+ */
54
58
  export declare class Table {
55
59
  static table: Table;
56
60
  static stageTable(obj: DisplayObject): Table;
@@ -59,7 +63,7 @@ export declare class Table {
59
63
  gamePlay: GamePlay;
60
64
  stage: Stage;
61
65
  bgRect: Shape;
62
- hexMap: HexMap<Hex2>;
66
+ hexMap: HexMap<IHex2>;
63
67
  paramGUIs: ParamGUI[];
64
68
  netGUI: ParamGUI;
65
69
  /** initial visibility for toggleText */
@@ -73,7 +77,12 @@ export declare class Table {
73
77
  winText: Text;
74
78
  winBack: Shape;
75
79
  dragger: Dragger;
76
- overlayCont: Container;
80
+ /**
81
+ * constructor for newHex2() off-map Hex.
82
+ *
83
+ * typically: this.hexC = this.hexMap.hexC as Constructor\<IHex2\> */
84
+ hexC: Constructor<IHex2>;
85
+ overlayCont: NamedContainer;
77
86
  constructor(stage: Stage);
78
87
  /** shows the last 2 start of turn lines */
79
88
  turnLog: TextLog;
@@ -90,12 +99,312 @@ export declare class Table {
90
99
  toggleText(vis?: boolean): undefined;
91
100
  aiControl(color?: string, dx?: number, rad?: number): Container;
92
101
  /** all the non-map hexes created by newHex2 */
93
- newHexes: Hex2[];
94
- newHex2(row: number | undefined, col: number | undefined, name: string, claz?: Constructor<Hex2>, sy?: number): Hex2;
102
+ newHexes: IHex2[];
103
+ newHex2(row: number | undefined, col: number | undefined, name: string, claz?: Constructor<IHex2>, sy?: number): {
104
+ implementsIHex2: boolean;
105
+ readonly cont: import("./hex").HexCont;
106
+ readonly radius: number;
107
+ readonly hexShape: HexShape;
108
+ readonly mapCont: import("./hex").MapCont;
109
+ readonly markCont: Container;
110
+ x: number;
111
+ y: number;
112
+ readonly scaleX: number;
113
+ readonly scaleY: number;
114
+ district: number | undefined;
115
+ distColor: string;
116
+ distText: Text;
117
+ rcText: Text;
118
+ setUnit: (unit: Tile, meep?: boolean) => void;
119
+ tile: Tile | undefined;
120
+ meep: import("./meeple").Meeple | undefined;
121
+ constructorCode: (map: import("./hex").HexM<{
122
+ implementsIHex2: boolean;
123
+ readonly cont: import("./hex").HexCont;
124
+ readonly radius: number;
125
+ readonly hexShape: HexShape;
126
+ readonly mapCont: import("./hex").MapCont;
127
+ readonly markCont: Container;
128
+ x: number;
129
+ y: number;
130
+ readonly scaleX: number;
131
+ readonly scaleY: number;
132
+ district: number | undefined;
133
+ distColor: string;
134
+ distText: Text;
135
+ rcText: Text;
136
+ setUnit: (unit: Tile, meep?: boolean) => void;
137
+ tile: Tile | undefined;
138
+ meep: import("./meeple").Meeple | undefined;
139
+ constructorCode: any;
140
+ showText: (vis?: boolean) => void;
141
+ readonly legalMark: import("./shapes").LegalMark;
142
+ isLegal: boolean;
143
+ initCont: (row: number, col: number) => void;
144
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
145
+ setHexColor: (color: string, district?: number | undefined) => void;
146
+ metricDist: (hex: Hex) => number;
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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
149
+ _tile: import("./tile").MapTile | undefined;
150
+ _meep: import("./meeple").Meeple | undefined;
151
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
152
+ toString: (color?: string) => string;
153
+ rcspString: (color?: string) => string;
154
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
155
+ x: number;
156
+ y: number;
157
+ w: number;
158
+ h: number;
159
+ dxdc: number;
160
+ dydr: number;
161
+ };
162
+ readonly xywh0: {
163
+ x: number;
164
+ y: number;
165
+ w: number;
166
+ h: number;
167
+ dxdc: number;
168
+ dydr: number;
169
+ };
170
+ Aname: string;
171
+ readonly iHex: IdHex;
172
+ readonly rcs: string;
173
+ readonly rowsp: string;
174
+ readonly colsp: string;
175
+ readonly rcsp: string;
176
+ readonly rc_linear: number;
177
+ _rcLinear?: number | undefined;
178
+ _district: number | undefined;
179
+ readonly isOnMap: boolean;
180
+ _isLegal: boolean;
181
+ readonly map: import("./hex").HexM<Hex>;
182
+ readonly row: number;
183
+ readonly col: number;
184
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
185
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
186
+ readonly linkDirs: import("./hex-intfs").HexDir[];
187
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
188
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
191
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
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) => Hex | undefined;
194
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
195
+ radialDist: (hex: Hex) => number;
196
+ }>, row: number, col: number, name?: string | undefined) => void;
197
+ showText: (vis?: boolean) => void;
198
+ readonly legalMark: import("./shapes").LegalMark;
199
+ isLegal: boolean;
200
+ initCont: (row: number, col: number) => void;
201
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
202
+ setHexColor: (color: string, district?: number | undefined) => void;
203
+ metricDist: (hex: Hex) => number;
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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
206
+ _tile: import("./tile").MapTile | undefined;
207
+ _meep: import("./meeple").Meeple | undefined;
208
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
209
+ toString: (color?: string) => string;
210
+ rcspString: (color?: string) => string;
211
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
212
+ x: number;
213
+ y: number;
214
+ w: number;
215
+ h: number;
216
+ dxdc: number;
217
+ dydr: number;
218
+ };
219
+ readonly xywh0: {
220
+ x: number;
221
+ y: number;
222
+ w: number;
223
+ h: number;
224
+ dxdc: number;
225
+ dydr: number;
226
+ };
227
+ Aname: string;
228
+ readonly iHex: IdHex;
229
+ readonly rcs: string;
230
+ readonly rowsp: string;
231
+ readonly colsp: string;
232
+ readonly rcsp: string;
233
+ readonly rc_linear: number;
234
+ _rcLinear?: number | undefined;
235
+ _district: number | undefined;
236
+ readonly isOnMap: boolean;
237
+ _isLegal: boolean;
238
+ readonly map: import("./hex").HexM<Hex>;
239
+ readonly row: number;
240
+ readonly col: number;
241
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
242
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
243
+ readonly linkDirs: import("./hex-intfs").HexDir[];
244
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
245
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
248
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
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) => Hex | undefined;
251
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
252
+ radialDist: (hex: Hex) => number;
253
+ };
95
254
  noRowHex(name: string, crxy: {
96
255
  row: number;
97
256
  col: number;
98
- }, claz?: Constructor<Hex2>): Hex2;
257
+ }, claz?: Constructor<IHex2>): {
258
+ implementsIHex2: boolean;
259
+ readonly cont: import("./hex").HexCont;
260
+ readonly radius: number;
261
+ readonly hexShape: HexShape;
262
+ readonly mapCont: import("./hex").MapCont;
263
+ readonly markCont: Container;
264
+ x: number;
265
+ y: number;
266
+ readonly scaleX: number;
267
+ readonly scaleY: number;
268
+ district: number | undefined;
269
+ distColor: string;
270
+ distText: Text;
271
+ rcText: Text;
272
+ setUnit: (unit: Tile, meep?: boolean) => void;
273
+ tile: Tile | undefined;
274
+ meep: import("./meeple").Meeple | undefined;
275
+ constructorCode: (map: import("./hex").HexM<{
276
+ implementsIHex2: boolean;
277
+ readonly cont: import("./hex").HexCont;
278
+ readonly radius: number;
279
+ readonly hexShape: HexShape;
280
+ readonly mapCont: import("./hex").MapCont;
281
+ readonly markCont: Container;
282
+ x: number;
283
+ y: number;
284
+ readonly scaleX: number;
285
+ readonly scaleY: number;
286
+ district: number | undefined;
287
+ distColor: string;
288
+ distText: Text;
289
+ rcText: Text;
290
+ setUnit: (unit: Tile, meep?: boolean) => void;
291
+ tile: Tile | undefined;
292
+ meep: import("./meeple").Meeple | undefined;
293
+ constructorCode: any;
294
+ showText: (vis?: boolean) => void;
295
+ readonly legalMark: import("./shapes").LegalMark;
296
+ isLegal: boolean;
297
+ initCont: (row: number, col: number) => void;
298
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
299
+ setHexColor: (color: string, district?: number | undefined) => void;
300
+ metricDist: (hex: Hex) => number;
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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
303
+ _tile: import("./tile").MapTile | undefined;
304
+ _meep: import("./meeple").Meeple | undefined;
305
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
306
+ toString: (color?: string) => string;
307
+ rcspString: (color?: string) => string;
308
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
309
+ x: number;
310
+ y: number;
311
+ w: number;
312
+ h: number;
313
+ dxdc: number;
314
+ dydr: number;
315
+ };
316
+ readonly xywh0: {
317
+ x: number;
318
+ y: number;
319
+ w: number;
320
+ h: number;
321
+ dxdc: number;
322
+ dydr: number;
323
+ };
324
+ Aname: string;
325
+ readonly iHex: IdHex;
326
+ readonly rcs: string;
327
+ readonly rowsp: string;
328
+ readonly colsp: string;
329
+ readonly rcsp: string;
330
+ readonly rc_linear: number;
331
+ _rcLinear?: number | undefined;
332
+ _district: number | undefined;
333
+ readonly isOnMap: boolean;
334
+ _isLegal: boolean;
335
+ readonly map: import("./hex").HexM<Hex>;
336
+ readonly row: number;
337
+ readonly col: number;
338
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
339
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
340
+ readonly linkDirs: import("./hex-intfs").HexDir[];
341
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
342
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
345
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
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) => Hex | undefined;
348
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
349
+ radialDist: (hex: Hex) => number;
350
+ }>, row: number, col: number, name?: string | undefined) => void;
351
+ showText: (vis?: boolean) => void;
352
+ readonly legalMark: import("./shapes").LegalMark;
353
+ isLegal: boolean;
354
+ initCont: (row: number, col: number) => void;
355
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
356
+ setHexColor: (color: string, district?: number | undefined) => void;
357
+ metricDist: (hex: Hex) => number;
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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
360
+ _tile: import("./tile").MapTile | undefined;
361
+ _meep: import("./meeple").Meeple | undefined;
362
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
363
+ toString: (color?: string) => string;
364
+ rcspString: (color?: string) => string;
365
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
366
+ x: number;
367
+ y: number;
368
+ w: number;
369
+ h: number;
370
+ dxdc: number;
371
+ dydr: number;
372
+ };
373
+ readonly xywh0: {
374
+ x: number;
375
+ y: number;
376
+ w: number;
377
+ h: number;
378
+ dxdc: number;
379
+ dydr: number;
380
+ };
381
+ Aname: string;
382
+ readonly iHex: IdHex;
383
+ readonly rcs: string;
384
+ readonly rowsp: string;
385
+ readonly colsp: string;
386
+ readonly rcsp: string;
387
+ readonly rc_linear: number;
388
+ _rcLinear?: number | undefined;
389
+ _district: number | undefined;
390
+ readonly isOnMap: boolean;
391
+ _isLegal: boolean;
392
+ readonly map: import("./hex").HexM<Hex>;
393
+ readonly row: number;
394
+ readonly col: number;
395
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
396
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
397
+ readonly linkDirs: import("./hex-intfs").HexDir[];
398
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
399
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
402
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
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) => Hex | undefined;
405
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
406
+ radialDist: (hex: Hex) => number;
407
+ };
99
408
  /**
100
409
  * all number in units of dxdc or dydr
101
410
  * @param x0 frame left; relative to scaleCont
@@ -112,6 +421,10 @@ export declare class Table {
112
421
  w: number;
113
422
  h: number;
114
423
  };
424
+ /**
425
+ * Inject gamePlay, gamePlay.hexMap and hexC; setBackground and cache; layoutTable2; makePerPlayer;
426
+ * setupUndoButtons; layoutTurnlog;
427
+ */
115
428
  layoutTable(gamePlay: GamePlay): void;
116
429
  layoutTurnlog(rowy?: number, colx?: number): void;
117
430
  colf(pIndex: number, icol: number, row: number): {
@@ -143,10 +456,160 @@ export declare class Table {
143
456
  makePerPlayer(): void;
144
457
  /** move cont to nominal [row, col] of hexCont */
145
458
  setToRowCol(cont: Container, row?: number, col?: number, hexCont?: Container): void;
146
- sourceOnHex(source: TileSource<Tile>, hex: Hex2): void;
459
+ sourceOnHex(source: TileSource<Tile>, hex: IHex2): void;
147
460
  makeCircleButton(color?: string, rad?: number, c?: string, fs?: number): Container;
148
461
  makeSquareButton(color: string | undefined, xywh: XYWH, c?: string, fs?: number): Container;
149
- makeRecycleHex(row?: number, col?: number): Hex2;
462
+ makeRecycleHex(row?: number, col?: number, claz?: typeof RecycleHex): {
463
+ implementsIHex2: boolean;
464
+ readonly cont: import("./hex").HexCont;
465
+ readonly radius: number;
466
+ readonly hexShape: HexShape;
467
+ readonly mapCont: import("./hex").MapCont;
468
+ readonly markCont: Container;
469
+ x: number;
470
+ y: number;
471
+ readonly scaleX: number;
472
+ readonly scaleY: number;
473
+ district: number | undefined;
474
+ distColor: string;
475
+ distText: Text;
476
+ rcText: Text;
477
+ setUnit: (unit: Tile, meep?: boolean) => void;
478
+ tile: Tile | undefined;
479
+ meep: import("./meeple").Meeple | undefined;
480
+ constructorCode: (map: import("./hex").HexM<{
481
+ implementsIHex2: boolean;
482
+ readonly cont: import("./hex").HexCont;
483
+ readonly radius: number;
484
+ readonly hexShape: HexShape;
485
+ readonly mapCont: import("./hex").MapCont;
486
+ readonly markCont: Container;
487
+ x: number;
488
+ y: number;
489
+ readonly scaleX: number;
490
+ readonly scaleY: number;
491
+ district: number | undefined;
492
+ distColor: string;
493
+ distText: Text;
494
+ rcText: Text;
495
+ setUnit: (unit: Tile, meep?: boolean) => void;
496
+ tile: Tile | undefined;
497
+ meep: import("./meeple").Meeple | undefined;
498
+ constructorCode: any;
499
+ showText: (vis?: boolean) => void;
500
+ readonly legalMark: import("./shapes").LegalMark;
501
+ isLegal: boolean;
502
+ initCont: (row: number, col: number) => void;
503
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
504
+ setHexColor: (color: string, district?: number | undefined) => void;
505
+ metricDist: (hex: Hex) => number;
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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
508
+ _tile: import("./tile").MapTile | undefined;
509
+ _meep: import("./meeple").Meeple | undefined;
510
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
511
+ toString: (color?: string) => string;
512
+ rcspString: (color?: string) => string;
513
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
514
+ x: number;
515
+ y: number;
516
+ w: number;
517
+ h: number;
518
+ dxdc: number;
519
+ dydr: number;
520
+ };
521
+ readonly xywh0: {
522
+ x: number;
523
+ y: number;
524
+ w: number;
525
+ h: number;
526
+ dxdc: number;
527
+ dydr: number;
528
+ };
529
+ Aname: string;
530
+ readonly iHex: IdHex;
531
+ readonly rcs: string;
532
+ readonly rowsp: string;
533
+ readonly colsp: string;
534
+ readonly rcsp: string;
535
+ readonly rc_linear: number;
536
+ _rcLinear?: number | undefined;
537
+ _district: number | undefined;
538
+ readonly isOnMap: boolean;
539
+ _isLegal: boolean;
540
+ readonly map: import("./hex").HexM<Hex>;
541
+ readonly row: number;
542
+ readonly col: number;
543
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
544
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
545
+ readonly linkDirs: import("./hex-intfs").HexDir[];
546
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
547
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
550
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
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) => Hex | undefined;
553
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
554
+ radialDist: (hex: Hex) => number;
555
+ }>, row: number, col: number, name?: string | undefined) => void;
556
+ showText: (vis?: boolean) => void;
557
+ readonly legalMark: import("./shapes").LegalMark;
558
+ isLegal: boolean;
559
+ initCont: (row: number, col: number) => void;
560
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
561
+ setHexColor: (color: string, district?: number | undefined) => void;
562
+ metricDist: (hex: Hex) => number;
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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
565
+ _tile: import("./tile").MapTile | undefined;
566
+ _meep: import("./meeple").Meeple | undefined;
567
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
568
+ toString: (color?: string) => string;
569
+ rcspString: (color?: string) => string;
570
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
571
+ x: number;
572
+ y: number;
573
+ w: number;
574
+ h: number;
575
+ dxdc: number;
576
+ dydr: number;
577
+ };
578
+ readonly xywh0: {
579
+ x: number;
580
+ y: number;
581
+ w: number;
582
+ h: number;
583
+ dxdc: number;
584
+ dydr: number;
585
+ };
586
+ Aname: string;
587
+ readonly iHex: IdHex;
588
+ readonly rcs: string;
589
+ readonly rowsp: string;
590
+ readonly colsp: string;
591
+ readonly rcsp: string;
592
+ readonly rc_linear: number;
593
+ _rcLinear?: number | undefined;
594
+ _district: number | undefined;
595
+ readonly isOnMap: boolean;
596
+ _isLegal: boolean;
597
+ readonly map: import("./hex").HexM<Hex>;
598
+ readonly row: number;
599
+ readonly col: number;
600
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
601
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
602
+ readonly linkDirs: import("./hex-intfs").HexDir[];
603
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
604
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
607
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
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) => Hex | undefined;
610
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
611
+ radialDist: (hex: Hex) => number;
612
+ };
150
613
  /** Params that affect the rules of the game & board
151
614
  *
152
615
  * ParamGUI --> board & rules [under stats panel]
@@ -169,25 +632,650 @@ export declare class Table {
169
632
  /** update table when a new Game is started. */
170
633
  startGame(scenario: Scenario): void;
171
634
  makeDragable(tile: DisplayObject): void;
172
- hexUnderObj(dragObj: DisplayObject, legalOnly?: boolean): Hex2 | undefined;
635
+ hexUnderObj(dragObj: DisplayObject, legalOnly?: boolean): {
636
+ implementsIHex2: boolean;
637
+ readonly cont: import("./hex").HexCont;
638
+ readonly radius: number;
639
+ readonly hexShape: HexShape;
640
+ readonly mapCont: import("./hex").MapCont;
641
+ readonly markCont: Container;
642
+ x: number;
643
+ y: number;
644
+ readonly scaleX: number;
645
+ readonly scaleY: number;
646
+ district: number | undefined;
647
+ distColor: string;
648
+ distText: Text;
649
+ rcText: Text;
650
+ setUnit: (unit: Tile, meep?: boolean) => void;
651
+ tile: Tile | undefined;
652
+ meep: import("./meeple").Meeple | undefined;
653
+ constructorCode: (map: import("./hex").HexM<{
654
+ implementsIHex2: boolean;
655
+ readonly cont: import("./hex").HexCont;
656
+ readonly radius: number;
657
+ readonly hexShape: HexShape;
658
+ readonly mapCont: import("./hex").MapCont;
659
+ readonly markCont: Container;
660
+ x: number;
661
+ y: number;
662
+ readonly scaleX: number;
663
+ readonly scaleY: number;
664
+ district: number | undefined;
665
+ distColor: string;
666
+ distText: Text;
667
+ rcText: Text;
668
+ setUnit: (unit: Tile, meep?: boolean) => void;
669
+ tile: Tile | undefined;
670
+ meep: import("./meeple").Meeple | undefined;
671
+ constructorCode: any;
672
+ showText: (vis?: boolean) => void;
673
+ readonly legalMark: import("./shapes").LegalMark;
674
+ isLegal: boolean;
675
+ initCont: (row: number, col: number) => void;
676
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
677
+ setHexColor: (color: string, district?: number | undefined) => void;
678
+ metricDist: (hex: Hex) => number;
679
+ 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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
681
+ _tile: import("./tile").MapTile | undefined;
682
+ _meep: import("./meeple").Meeple | undefined;
683
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
684
+ toString: (color?: string) => string;
685
+ rcspString: (color?: string) => string;
686
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
687
+ x: number;
688
+ y: number;
689
+ w: number;
690
+ h: number;
691
+ dxdc: number;
692
+ dydr: number;
693
+ };
694
+ readonly xywh0: {
695
+ x: number;
696
+ y: number;
697
+ w: number;
698
+ h: number;
699
+ dxdc: number;
700
+ dydr: number;
701
+ };
702
+ Aname: string;
703
+ readonly iHex: IdHex;
704
+ readonly rcs: string;
705
+ readonly rowsp: string;
706
+ readonly colsp: string;
707
+ readonly rcsp: string;
708
+ readonly rc_linear: number;
709
+ _rcLinear?: number | undefined;
710
+ _district: number | undefined;
711
+ readonly isOnMap: boolean;
712
+ _isLegal: boolean;
713
+ readonly map: import("./hex").HexM<Hex>;
714
+ readonly row: number;
715
+ readonly col: number;
716
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
717
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
718
+ readonly linkDirs: import("./hex-intfs").HexDir[];
719
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
720
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
721
+ 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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
723
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
724
+ 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) => Hex | undefined;
726
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
727
+ radialDist: (hex: Hex) => number;
728
+ }>, row: number, col: number, name?: string | undefined) => void;
729
+ showText: (vis?: boolean) => void;
730
+ readonly legalMark: import("./shapes").LegalMark;
731
+ isLegal: boolean;
732
+ initCont: (row: number, col: number) => void;
733
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
734
+ setHexColor: (color: string, district?: number | undefined) => void;
735
+ metricDist: (hex: Hex) => number;
736
+ 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
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
738
+ _tile: import("./tile").MapTile | undefined;
739
+ _meep: import("./meeple").Meeple | undefined;
740
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
741
+ toString: (color?: string) => string;
742
+ rcspString: (color?: string) => string;
743
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
744
+ x: number;
745
+ y: number;
746
+ w: number;
747
+ h: number;
748
+ dxdc: number;
749
+ dydr: number;
750
+ };
751
+ readonly xywh0: {
752
+ x: number;
753
+ y: number;
754
+ w: number;
755
+ h: number;
756
+ dxdc: number;
757
+ dydr: number;
758
+ };
759
+ Aname: string;
760
+ readonly iHex: IdHex;
761
+ readonly rcs: string;
762
+ readonly rowsp: string;
763
+ readonly colsp: string;
764
+ readonly rcsp: string;
765
+ readonly rc_linear: number;
766
+ _rcLinear?: number | undefined;
767
+ _district: number | undefined;
768
+ readonly isOnMap: boolean;
769
+ _isLegal: boolean;
770
+ readonly map: import("./hex").HexM<Hex>;
771
+ readonly row: number;
772
+ readonly col: number;
773
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
774
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
775
+ readonly linkDirs: import("./hex-intfs").HexDir[];
776
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
777
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
778
+ 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: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
780
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
781
+ 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) => Hex | undefined;
783
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
784
+ radialDist: (hex: Hex) => number;
785
+ } | undefined;
173
786
  dragContext: DragContext;
787
+ /** Direct callback from this.dragger. Invoke this.dragFunc0(tile, info, hexUnderTile) */
174
788
  dragFunc(tile: DisplayObject, info?: DragInfo): void;
175
- /** Table.dragFunc0 (Table.dragFunc to inject drag/start actions programatically)
789
+ /** Table.dragFunc0
790
+ *
791
+ * Version of Table.dragFunc used to inject drag/start actions programatically.
792
+ *
793
+ * Calls out to Tile.dragFunc0(IHex2, DragContext)
176
794
  * @param tile is being dragged
177
795
  * @param info { first: boolean, event: MouseEvent }
178
- * @param hex the Hex that tile is currently over (may be undefined or off map)
796
+ * @param hex the IHex2 which tile is currently over (may be undefined or off map)
797
+ */
798
+ dragFunc0(tile: Tile, info?: DragInfo, hex?: {
799
+ implementsIHex2: boolean;
800
+ readonly cont: import("./hex").HexCont;
801
+ readonly radius: number;
802
+ readonly hexShape: HexShape;
803
+ readonly mapCont: import("./hex").MapCont;
804
+ readonly markCont: Container;
805
+ x: number;
806
+ y: number;
807
+ readonly scaleX: number;
808
+ readonly scaleY: number;
809
+ district: number | undefined;
810
+ distColor: string;
811
+ distText: Text;
812
+ rcText: Text;
813
+ setUnit: (unit: Tile, meep?: boolean) => void;
814
+ tile: Tile | undefined;
815
+ meep: import("./meeple").Meeple | undefined;
816
+ constructorCode: (map: import("./hex").HexM<{
817
+ implementsIHex2: boolean;
818
+ readonly cont: import("./hex").HexCont;
819
+ readonly radius: number;
820
+ readonly hexShape: HexShape;
821
+ readonly mapCont: import("./hex").MapCont;
822
+ readonly markCont: Container;
823
+ x: number;
824
+ y: number;
825
+ readonly scaleX: number;
826
+ readonly scaleY: number;
827
+ district: number | undefined;
828
+ distColor: string;
829
+ distText: Text;
830
+ rcText: Text;
831
+ setUnit: (unit: Tile, meep?: boolean) => void;
832
+ tile: Tile | undefined;
833
+ meep: import("./meeple").Meeple | undefined;
834
+ constructorCode: any;
835
+ showText: (vis?: boolean) => void;
836
+ readonly legalMark: import("./shapes").LegalMark;
837
+ isLegal: boolean;
838
+ initCont: (row: number, col: number) => void;
839
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
840
+ setHexColor: (color: string, district?: number | undefined) => void;
841
+ metricDist: (hex: Hex) => number;
842
+ cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
843
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
844
+ _tile: import("./tile").MapTile | undefined;
845
+ _meep: import("./meeple").Meeple | undefined;
846
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
847
+ toString: (color?: string) => string;
848
+ rcspString: (color?: string) => string;
849
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
850
+ x: number;
851
+ y: number;
852
+ w: number;
853
+ h: number;
854
+ dxdc: number;
855
+ dydr: number;
856
+ };
857
+ readonly xywh0: {
858
+ x: number;
859
+ y: number;
860
+ w: number;
861
+ h: number;
862
+ dxdc: number;
863
+ dydr: number;
864
+ };
865
+ Aname: string;
866
+ readonly iHex: IdHex;
867
+ readonly rcs: string;
868
+ readonly rowsp: string;
869
+ readonly colsp: string;
870
+ readonly rcsp: string;
871
+ readonly rc_linear: number;
872
+ _rcLinear?: number | undefined;
873
+ _district: number | undefined;
874
+ readonly isOnMap: boolean;
875
+ _isLegal: boolean;
876
+ readonly map: import("./hex").HexM<Hex>;
877
+ readonly row: number;
878
+ readonly col: number;
879
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
880
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
881
+ readonly linkDirs: import("./hex-intfs").HexDir[];
882
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
883
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
884
+ findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
885
+ findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
886
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
887
+ forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
888
+ nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => Hex | undefined;
889
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
890
+ radialDist: (hex: Hex) => number;
891
+ }>, row: number, col: number, name?: string | undefined) => void;
892
+ showText: (vis?: boolean) => void;
893
+ readonly legalMark: import("./shapes").LegalMark;
894
+ isLegal: boolean;
895
+ initCont: (row: number, col: number) => void;
896
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
897
+ setHexColor: (color: string, district?: number | undefined) => void;
898
+ metricDist: (hex: Hex) => number;
899
+ cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
900
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
901
+ _tile: import("./tile").MapTile | undefined;
902
+ _meep: import("./meeple").Meeple | undefined;
903
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
904
+ toString: (color?: string) => string;
905
+ rcspString: (color?: string) => string;
906
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
907
+ x: number;
908
+ y: number;
909
+ w: number;
910
+ h: number;
911
+ dxdc: number;
912
+ dydr: number;
913
+ };
914
+ readonly xywh0: {
915
+ x: number;
916
+ y: number;
917
+ w: number;
918
+ h: number;
919
+ dxdc: number;
920
+ dydr: number;
921
+ };
922
+ Aname: string;
923
+ readonly iHex: IdHex;
924
+ readonly rcs: string;
925
+ readonly rowsp: string;
926
+ readonly colsp: string;
927
+ readonly rcsp: string;
928
+ readonly rc_linear: number;
929
+ _rcLinear?: number | undefined;
930
+ _district: number | undefined;
931
+ readonly isOnMap: boolean;
932
+ _isLegal: boolean;
933
+ readonly map: import("./hex").HexM<Hex>;
934
+ readonly row: number;
935
+ readonly col: number;
936
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
937
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
938
+ readonly linkDirs: import("./hex-intfs").HexDir[];
939
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
940
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
941
+ findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
942
+ findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
943
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
944
+ forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
945
+ nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => Hex | undefined;
946
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
947
+ radialDist: (hex: Hex) => number;
948
+ } | undefined): void;
949
+ /** invoke dragShift callback if shift state changes */
950
+ checkShift(hex: IHex2 | undefined, ctx: DragContext): void;
951
+ /**
952
+ * Try start dragging.
953
+ * Abort if tile.cantBeMoved(player)
954
+ *
955
+ * Inform tile.dragStart(ctx)
956
+ *
957
+ * Mark all legal Hexes, set ctx.nLegal
958
+ *
959
+ * tile.moveTo(undefined); // dropFunc() will placeTile on targetHex/fromHex.
960
+ *
961
+ * Invoke tile.noLegalTarget(ctx) if nLegal === 0
962
+ *
963
+ * @param tile the Tile to be Dragged
964
+ * @param ctx DragContext with shift/ctrl from table.dragFunc0()
179
965
  */
180
- dragFunc0(tile: Tile, info?: DragInfo, hex?: Hex2 | undefined): void;
181
- checkShift(hex: Hex2 | undefined, ctx: DragContext): void;
182
966
  dragStart(tile: Tile, ctx: DragContext): void;
183
- /** state of shiftKey has changed during drag */
967
+ /** state of shiftKey has changed during drag. call tile.dragShift(). */
184
968
  dragShift(tile: Tile | undefined, shiftKey: boolean | undefined, ctx: DragContext): void;
185
- dropFunc(dobj: DisplayObject, info?: DragInfo, hex?: Hex2 | undefined): void;
969
+ /** dropFunc for each Dragable/Tile -> tile.dropFunc0(hex, ctx) */
970
+ dropFunc(dobj: DisplayObject, info?: DragInfo, hex?: {
971
+ implementsIHex2: boolean;
972
+ readonly cont: import("./hex").HexCont;
973
+ readonly radius: number;
974
+ readonly hexShape: HexShape;
975
+ readonly mapCont: import("./hex").MapCont;
976
+ readonly markCont: Container;
977
+ x: number;
978
+ y: number;
979
+ readonly scaleX: number;
980
+ readonly scaleY: number;
981
+ district: number | undefined;
982
+ distColor: string;
983
+ distText: Text;
984
+ rcText: Text;
985
+ setUnit: (unit: Tile, meep?: boolean) => void;
986
+ tile: Tile | undefined;
987
+ meep: import("./meeple").Meeple | undefined;
988
+ constructorCode: (map: import("./hex").HexM<{
989
+ implementsIHex2: boolean;
990
+ readonly cont: import("./hex").HexCont;
991
+ readonly radius: number;
992
+ readonly hexShape: HexShape;
993
+ readonly mapCont: import("./hex").MapCont;
994
+ readonly markCont: Container;
995
+ x: number;
996
+ y: number;
997
+ readonly scaleX: number;
998
+ readonly scaleY: number;
999
+ district: number | undefined;
1000
+ distColor: string;
1001
+ distText: Text;
1002
+ rcText: Text;
1003
+ setUnit: (unit: Tile, meep?: boolean) => void;
1004
+ tile: Tile | undefined;
1005
+ meep: import("./meeple").Meeple | undefined;
1006
+ constructorCode: any;
1007
+ showText: (vis?: boolean) => void;
1008
+ readonly legalMark: import("./shapes").LegalMark;
1009
+ isLegal: boolean;
1010
+ initCont: (row: number, col: number) => void;
1011
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
1012
+ setHexColor: (color: string, district?: number | undefined) => void;
1013
+ metricDist: (hex: Hex) => number;
1014
+ cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
1015
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
1016
+ _tile: import("./tile").MapTile | undefined;
1017
+ _meep: import("./meeple").Meeple | undefined;
1018
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
1019
+ toString: (color?: string) => string;
1020
+ rcspString: (color?: string) => string;
1021
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
1022
+ x: number;
1023
+ y: number;
1024
+ w: number;
1025
+ h: number;
1026
+ dxdc: number;
1027
+ dydr: number;
1028
+ };
1029
+ readonly xywh0: {
1030
+ x: number;
1031
+ y: number;
1032
+ w: number;
1033
+ h: number;
1034
+ dxdc: number;
1035
+ dydr: number;
1036
+ };
1037
+ Aname: string;
1038
+ readonly iHex: IdHex;
1039
+ readonly rcs: string;
1040
+ readonly rowsp: string;
1041
+ readonly colsp: string;
1042
+ readonly rcsp: string;
1043
+ readonly rc_linear: number;
1044
+ _rcLinear?: number | undefined;
1045
+ _district: number | undefined;
1046
+ readonly isOnMap: boolean;
1047
+ _isLegal: boolean;
1048
+ readonly map: import("./hex").HexM<Hex>;
1049
+ readonly row: number;
1050
+ readonly col: number;
1051
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
1052
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
1053
+ readonly linkDirs: import("./hex-intfs").HexDir[];
1054
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
1055
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
1056
+ findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
1057
+ findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
1058
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
1059
+ forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
1060
+ nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => Hex | undefined;
1061
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
1062
+ radialDist: (hex: Hex) => number;
1063
+ }>, row: number, col: number, name?: string | undefined) => void;
1064
+ showText: (vis?: boolean) => void;
1065
+ readonly legalMark: import("./shapes").LegalMark;
1066
+ isLegal: boolean;
1067
+ initCont: (row: number, col: number) => void;
1068
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
1069
+ setHexColor: (color: string, district?: number | undefined) => void;
1070
+ metricDist: (hex: Hex) => number;
1071
+ cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
1072
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
1073
+ _tile: import("./tile").MapTile | undefined;
1074
+ _meep: import("./meeple").Meeple | undefined;
1075
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
1076
+ toString: (color?: string) => string;
1077
+ rcspString: (color?: string) => string;
1078
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
1079
+ x: number;
1080
+ y: number;
1081
+ w: number;
1082
+ h: number;
1083
+ dxdc: number;
1084
+ dydr: number;
1085
+ };
1086
+ readonly xywh0: {
1087
+ x: number;
1088
+ y: number;
1089
+ w: number;
1090
+ h: number;
1091
+ dxdc: number;
1092
+ dydr: number;
1093
+ };
1094
+ Aname: string;
1095
+ readonly iHex: IdHex;
1096
+ readonly rcs: string;
1097
+ readonly rowsp: string;
1098
+ readonly colsp: string;
1099
+ readonly rcsp: string;
1100
+ readonly rc_linear: number;
1101
+ _rcLinear?: number | undefined;
1102
+ _district: number | undefined;
1103
+ readonly isOnMap: boolean;
1104
+ _isLegal: boolean;
1105
+ readonly map: import("./hex").HexM<Hex>;
1106
+ readonly row: number;
1107
+ readonly col: number;
1108
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
1109
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
1110
+ readonly linkDirs: import("./hex-intfs").HexDir[];
1111
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
1112
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
1113
+ findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
1114
+ findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
1115
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
1116
+ forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
1117
+ nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => Hex | undefined;
1118
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
1119
+ radialDist: (hex: Hex) => number;
1120
+ } | undefined): void;
186
1121
  /** synthesize dragStart(tile), tile.dragFunc0(hex), dropFunc(tile); */
187
1122
  dragStartAndDrop(tile: Tile, toHex: Hex): void;
188
1123
  private isDragging;
189
- /** Force this.dragger to drop the current drag object on given target Hex */
190
- stopDragging(target?: Hex2 | undefined): void;
1124
+ /** Force this.dragger to drop the current drag object on given target Hex.
1125
+ *
1126
+ * without checking isLegalTarget();
1127
+ */
1128
+ stopDragging(target?: {
1129
+ implementsIHex2: boolean;
1130
+ readonly cont: import("./hex").HexCont;
1131
+ readonly radius: number;
1132
+ readonly hexShape: HexShape;
1133
+ readonly mapCont: import("./hex").MapCont;
1134
+ readonly markCont: Container;
1135
+ x: number;
1136
+ y: number;
1137
+ readonly scaleX: number;
1138
+ readonly scaleY: number;
1139
+ district: number | undefined;
1140
+ distColor: string;
1141
+ distText: Text;
1142
+ rcText: Text;
1143
+ setUnit: (unit: Tile, meep?: boolean) => void;
1144
+ tile: Tile | undefined;
1145
+ meep: import("./meeple").Meeple | undefined;
1146
+ constructorCode: (map: import("./hex").HexM<{
1147
+ implementsIHex2: boolean;
1148
+ readonly cont: import("./hex").HexCont;
1149
+ readonly radius: number;
1150
+ readonly hexShape: HexShape;
1151
+ readonly mapCont: import("./hex").MapCont;
1152
+ readonly markCont: Container;
1153
+ x: number;
1154
+ y: number;
1155
+ readonly scaleX: number;
1156
+ readonly scaleY: number;
1157
+ district: number | undefined;
1158
+ distColor: string;
1159
+ distText: Text;
1160
+ rcText: Text;
1161
+ setUnit: (unit: Tile, meep?: boolean) => void;
1162
+ tile: Tile | undefined;
1163
+ meep: import("./meeple").Meeple | undefined;
1164
+ constructorCode: any;
1165
+ showText: (vis?: boolean) => void;
1166
+ readonly legalMark: import("./shapes").LegalMark;
1167
+ isLegal: boolean;
1168
+ initCont: (row: number, col: number) => void;
1169
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
1170
+ setHexColor: (color: string, district?: number | undefined) => void;
1171
+ metricDist: (hex: Hex) => number;
1172
+ cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
1173
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
1174
+ _tile: import("./tile").MapTile | undefined;
1175
+ _meep: import("./meeple").Meeple | undefined;
1176
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
1177
+ toString: (color?: string) => string;
1178
+ rcspString: (color?: string) => string;
1179
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
1180
+ x: number;
1181
+ y: number;
1182
+ w: number;
1183
+ h: number;
1184
+ dxdc: number;
1185
+ dydr: number;
1186
+ };
1187
+ readonly xywh0: {
1188
+ x: number;
1189
+ y: number;
1190
+ w: number;
1191
+ h: number;
1192
+ dxdc: number;
1193
+ dydr: number;
1194
+ };
1195
+ Aname: string;
1196
+ readonly iHex: IdHex;
1197
+ readonly rcs: string;
1198
+ readonly rowsp: string;
1199
+ readonly colsp: string;
1200
+ readonly rcsp: string;
1201
+ readonly rc_linear: number;
1202
+ _rcLinear?: number | undefined;
1203
+ _district: number | undefined;
1204
+ readonly isOnMap: boolean;
1205
+ _isLegal: boolean;
1206
+ readonly map: import("./hex").HexM<Hex>;
1207
+ readonly row: number;
1208
+ readonly col: number;
1209
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
1210
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
1211
+ readonly linkDirs: import("./hex-intfs").HexDir[];
1212
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
1213
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
1214
+ findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
1215
+ findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
1216
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
1217
+ forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
1218
+ nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => Hex | undefined;
1219
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
1220
+ radialDist: (hex: Hex) => number;
1221
+ }>, row: number, col: number, name?: string | undefined) => void;
1222
+ showText: (vis?: boolean) => void;
1223
+ readonly legalMark: import("./shapes").LegalMark;
1224
+ isLegal: boolean;
1225
+ initCont: (row: number, col: number) => void;
1226
+ makeHexShape: (shape?: Constructor<HexShape>) => HexShape;
1227
+ setHexColor: (color: string, district?: number | undefined) => void;
1228
+ metricDist: (hex: Hex) => number;
1229
+ cornerPoint: (dir0: import("./hex-intfs").HexDir, dir1: import("./hex-intfs").HexDir, point?: import("@thegraid/easeljs-module").Point, rad?: number) => import("@thegraid/easeljs-module").Point;
1230
+ edgePoint: (dir: import("./hex-intfs").HexDir, rad?: number, point?: XY) => import("@thegraid/easeljs-module").Point;
1231
+ _tile: import("./tile").MapTile | undefined;
1232
+ _meep: import("./meeple").Meeple | undefined;
1233
+ readonly occupied: [Tile | undefined, import("./meeple").Meeple | undefined] | undefined;
1234
+ toString: (color?: string) => string;
1235
+ rcspString: (color?: string) => string;
1236
+ xywh: (radius?: number, ewTopo?: boolean, row?: number, col?: number) => {
1237
+ x: number;
1238
+ y: number;
1239
+ w: number;
1240
+ h: number;
1241
+ dxdc: number;
1242
+ dydr: number;
1243
+ };
1244
+ readonly xywh0: {
1245
+ x: number;
1246
+ y: number;
1247
+ w: number;
1248
+ h: number;
1249
+ dxdc: number;
1250
+ dydr: number;
1251
+ };
1252
+ Aname: string;
1253
+ readonly iHex: IdHex;
1254
+ readonly rcs: string;
1255
+ readonly rowsp: string;
1256
+ readonly colsp: string;
1257
+ readonly rcsp: string;
1258
+ readonly rc_linear: number;
1259
+ _rcLinear?: number | undefined;
1260
+ _district: number | undefined;
1261
+ readonly isOnMap: boolean;
1262
+ _isLegal: boolean;
1263
+ readonly map: import("./hex").HexM<Hex>;
1264
+ readonly row: number;
1265
+ readonly col: number;
1266
+ readonly links: import("./hex").LINKS<import("./hex").Hex2>;
1267
+ metaLinks: import("./hex").LINKS<import("./hex").Hex2>;
1268
+ readonly linkDirs: import("./hex-intfs").HexDir[];
1269
+ readonly linkHexes: (import("./hex").Hex2 | undefined)[];
1270
+ forEachLinkHex: (func: (hex: Hex | undefined, dir: import("./hex-intfs").HexDir | undefined, hex0: Hex) => unknown, inclCenter?: boolean) => void;
1271
+ findLinkHex: (pred: (hex: import("./hex").Hex2 | undefined, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => boolean) => import("./hex-intfs").HexDir | undefined;
1272
+ findInDir: (dir: import("./hex-intfs").HexDir, pred: (hex: Hex, dir: import("./hex-intfs").HexDir, hex0: Hex) => boolean) => Hex | undefined;
1273
+ hexesInDir: (dir: import("./hex-intfs").HexDir, rv?: import("./hex").Hex2[]) => import("./hex").Hex2[];
1274
+ forEachHexDir: (func: (hex: import("./hex").Hex2, dir: import("./hex-intfs").HexDir, hex0: import("./hex").Hex2) => unknown) => void;
1275
+ nextHex: (dir: import("./hex-intfs").HexDir, ns?: number) => Hex | undefined;
1276
+ lastHex: (ds: import("./hex-intfs").HexDir) => Hex;
1277
+ radialDist: (hex: Hex) => number;
1278
+ } | undefined): void;
191
1279
  /** Toggle dragging: dragTarget(target) OR stopDragging(targetHex)
192
1280
  * - attach supplied target to mouse-drag (default is eventHex.tile)
193
1281
  * @param target the DisplayObject being dragged