mons-web 0.1.112 → 0.1.115

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/mons-web.d.ts CHANGED
@@ -10,26 +10,6 @@
10
10
  export function winner(fen_w: string, fen_b: string, flat_moves_string_w: string, flat_moves_string_b: string): string;
11
11
  /**
12
12
  */
13
- export enum Consumable {
14
- Potion = 0,
15
- Bomb = 1,
16
- BombOrPotion = 2,
17
- }
18
- /**
19
- */
20
- export enum ManaKind {
21
- Regular = 0,
22
- Supermana = 1,
23
- }
24
- /**
25
- */
26
- export enum Modifier {
27
- SelectPotion = 0,
28
- SelectBomb = 1,
29
- Cancel = 2,
30
- }
31
- /**
32
- */
33
13
  export enum NextInputKind {
34
14
  MonMove = 0,
35
15
  ManaMove = 1,
@@ -43,30 +23,6 @@ export enum NextInputKind {
43
23
  }
44
24
  /**
45
25
  */
46
- export enum ItemModelKind {
47
- Mon = 0,
48
- Mana = 1,
49
- MonWithMana = 2,
50
- MonWithConsumable = 3,
51
- Consumable = 4,
52
- }
53
- /**
54
- */
55
- export enum MonKind {
56
- Demon = 0,
57
- Drainer = 1,
58
- Angel = 2,
59
- Spirit = 3,
60
- Mystic = 4,
61
- }
62
- /**
63
- */
64
- export enum Color {
65
- White = 0,
66
- Black = 1,
67
- }
68
- /**
69
- */
70
26
  export enum SquareModelKind {
71
27
  Regular = 0,
72
28
  ConsumableBase = 1,
@@ -77,14 +33,6 @@ export enum SquareModelKind {
77
33
  }
78
34
  /**
79
35
  */
80
- export enum AvailableMoveKind {
81
- MonMove = 0,
82
- ManaMove = 1,
83
- Action = 2,
84
- Potion = 3,
85
- }
86
- /**
87
- */
88
36
  export enum EventModelKind {
89
37
  MonMove = 0,
90
38
  ManaMove = 1,
@@ -109,6 +57,58 @@ export enum EventModelKind {
109
57
  }
110
58
  /**
111
59
  */
60
+ export enum ManaKind {
61
+ Regular = 0,
62
+ Supermana = 1,
63
+ }
64
+ /**
65
+ */
66
+ export enum MonKind {
67
+ Demon = 0,
68
+ Drainer = 1,
69
+ Angel = 2,
70
+ Spirit = 3,
71
+ Mystic = 4,
72
+ }
73
+ /**
74
+ */
75
+ export enum ItemModelKind {
76
+ Mon = 0,
77
+ Mana = 1,
78
+ MonWithMana = 2,
79
+ MonWithConsumable = 3,
80
+ Consumable = 4,
81
+ }
82
+ /**
83
+ */
84
+ export enum Modifier {
85
+ SelectPotion = 0,
86
+ SelectBomb = 1,
87
+ Cancel = 2,
88
+ }
89
+ /**
90
+ */
91
+ export enum Consumable {
92
+ Potion = 0,
93
+ Bomb = 1,
94
+ BombOrPotion = 2,
95
+ }
96
+ /**
97
+ */
98
+ export enum AvailableMoveKind {
99
+ MonMove = 0,
100
+ ManaMove = 1,
101
+ Action = 2,
102
+ Potion = 3,
103
+ }
104
+ /**
105
+ */
106
+ export enum Color {
107
+ White = 0,
108
+ Black = 1,
109
+ }
110
+ /**
111
+ */
112
112
  export enum OutputModelKind {
113
113
  InvalidInput = 0,
114
114
  LocationsToStartFrom = 1,
@@ -523,12 +523,6 @@ export interface InitOutput {
523
523
  readonly __wbg_squaremodel_free: (a: number) => void;
524
524
  readonly __wbg_set_nextinputmodel_location: (a: number, b: number) => void;
525
525
  readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
526
- readonly __wbg_get_location_i: (a: number) => number;
527
- readonly __wbg_get_location_j: (a: number) => number;
528
- readonly __wbg_location_free: (a: number) => void;
529
- readonly __wbg_set_location_i: (a: number, b: number) => void;
530
- readonly __wbg_set_location_j: (a: number, b: number) => void;
531
- readonly location_new: (a: number, b: number) => number;
532
526
  readonly __wbg_get_mon_color: (a: number) => number;
533
527
  readonly __wbg_get_mon_cooldown: (a: number) => number;
534
528
  readonly __wbg_get_mon_kind: (a: number) => number;
@@ -540,14 +534,17 @@ export interface InitOutput {
540
534
  readonly mon_faint: (a: number) => void;
541
535
  readonly mon_is_fainted: (a: number) => number;
542
536
  readonly mon_new: (a: number, b: number, c: number) => number;
537
+ readonly __wbg_get_location_i: (a: number) => number;
538
+ readonly __wbg_get_location_j: (a: number) => number;
539
+ readonly __wbg_location_free: (a: number) => void;
540
+ readonly __wbg_set_location_i: (a: number, b: number) => void;
541
+ readonly __wbg_set_location_j: (a: number, b: number) => void;
542
+ readonly location_new: (a: number, b: number) => number;
543
543
  readonly __wbindgen_malloc: (a: number, b: number) => number;
544
544
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
545
- readonly __wbindgen_export_2: WebAssembly.Table;
546
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6e4ba54d26c28ebf: (a: number, b: number) => void;
547
545
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
548
546
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
549
547
  readonly __wbindgen_exn_store: (a: number) => void;
550
- readonly wasm_bindgen__convert__closures__invoke2_mut__h6cfc31b0a14c9fbd: (a: number, b: number, c: number, d: number) => void;
551
548
  }
552
549
 
553
550
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/mons-web.js CHANGED
@@ -116,40 +116,6 @@ function getInt32Memory0() {
116
116
  return cachedInt32Memory0;
117
117
  }
118
118
 
119
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
120
- ? { register: () => {}, unregister: () => {} }
121
- : new FinalizationRegistry(state => {
122
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
123
- });
124
-
125
- function makeMutClosure(arg0, arg1, dtor, f) {
126
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
127
- const real = (...args) => {
128
- // First up with a closure we increment the internal reference
129
- // count. This ensures that the Rust closure environment won't
130
- // be deallocated while we're invoking it.
131
- state.cnt++;
132
- const a = state.a;
133
- state.a = 0;
134
- try {
135
- return f(a, state.b, ...args);
136
- } finally {
137
- if (--state.cnt === 0) {
138
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
139
- CLOSURE_DTORS.unregister(state);
140
- } else {
141
- state.a = a;
142
- }
143
- }
144
- };
145
- real.original = state;
146
- CLOSURE_DTORS.register(real, state, state);
147
- return real;
148
- }
149
- function __wbg_adapter_26(arg0, arg1) {
150
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6e4ba54d26c28ebf(arg0, arg1);
151
- }
152
-
153
119
  let cachedUint32Memory0 = null;
154
120
 
155
121
  function getUint32Memory0() {
@@ -230,40 +196,36 @@ function handleError(f, args) {
230
196
  wasm.__wbindgen_exn_store(addHeapObject(e));
231
197
  }
232
198
  }
233
- function __wbg_adapter_151(arg0, arg1, arg2, arg3) {
234
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h6cfc31b0a14c9fbd(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
235
- }
236
-
237
199
  /**
238
200
  */
239
- export const Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
201
+ export const NextInputKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",MysticAction:2,"2":"MysticAction",DemonAction:3,"3":"DemonAction",DemonAdditionalStep:4,"4":"DemonAdditionalStep",SpiritTargetCapture:5,"5":"SpiritTargetCapture",SpiritTargetMove:6,"6":"SpiritTargetMove",SelectConsumable:7,"7":"SelectConsumable",BombAttack:8,"8":"BombAttack", });
240
202
  /**
241
203
  */
242
- export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
204
+ export const SquareModelKind = Object.freeze({ Regular:0,"0":"Regular",ConsumableBase:1,"1":"ConsumableBase",SupermanaBase:2,"2":"SupermanaBase",ManaBase:3,"3":"ManaBase",ManaPool:4,"4":"ManaPool",MonBase:5,"5":"MonBase", });
243
205
  /**
244
206
  */
245
- export const Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
207
+ export const EventModelKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",ManaScored:2,"2":"ManaScored",MysticAction:3,"3":"MysticAction",DemonAction:4,"4":"DemonAction",DemonAdditionalStep:5,"5":"DemonAdditionalStep",SpiritTargetMove:6,"6":"SpiritTargetMove",PickupBomb:7,"7":"PickupBomb",PickupPotion:8,"8":"PickupPotion",PickupMana:9,"9":"PickupMana",MonFainted:10,"10":"MonFainted",ManaDropped:11,"11":"ManaDropped",SupermanaBackToBase:12,"12":"SupermanaBackToBase",BombAttack:13,"13":"BombAttack",MonAwake:14,"14":"MonAwake",BombExplosion:15,"15":"BombExplosion",NextTurn:16,"16":"NextTurn",GameOver:17,"17":"GameOver",Takeback:18,"18":"Takeback",UsePotion:19,"19":"UsePotion", });
246
208
  /**
247
209
  */
248
- export const NextInputKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",MysticAction:2,"2":"MysticAction",DemonAction:3,"3":"DemonAction",DemonAdditionalStep:4,"4":"DemonAdditionalStep",SpiritTargetCapture:5,"5":"SpiritTargetCapture",SpiritTargetMove:6,"6":"SpiritTargetMove",SelectConsumable:7,"7":"SelectConsumable",BombAttack:8,"8":"BombAttack", });
210
+ export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
249
211
  /**
250
212
  */
251
- export const ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
213
+ export const MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
252
214
  /**
253
215
  */
254
- export const MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
216
+ export const ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
255
217
  /**
256
218
  */
257
- export const Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
219
+ export const Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
258
220
  /**
259
221
  */
260
- export const SquareModelKind = Object.freeze({ Regular:0,"0":"Regular",ConsumableBase:1,"1":"ConsumableBase",SupermanaBase:2,"2":"SupermanaBase",ManaBase:3,"3":"ManaBase",ManaPool:4,"4":"ManaPool",MonBase:5,"5":"MonBase", });
222
+ export const Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
261
223
  /**
262
224
  */
263
225
  export const AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
264
226
  /**
265
227
  */
266
- export const EventModelKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",ManaScored:2,"2":"ManaScored",MysticAction:3,"3":"MysticAction",DemonAction:4,"4":"DemonAction",DemonAdditionalStep:5,"5":"DemonAdditionalStep",SpiritTargetMove:6,"6":"SpiritTargetMove",PickupBomb:7,"7":"PickupBomb",PickupPotion:8,"8":"PickupPotion",PickupMana:9,"9":"PickupMana",MonFainted:10,"10":"MonFainted",ManaDropped:11,"11":"ManaDropped",SupermanaBackToBase:12,"12":"SupermanaBackToBase",BombAttack:13,"13":"BombAttack",MonAwake:14,"14":"MonAwake",BombExplosion:15,"15":"BombExplosion",NextTurn:16,"16":"NextTurn",GameOver:17,"17":"GameOver",Takeback:18,"18":"Takeback",UsePotion:19,"19":"UsePotion", });
228
+ export const Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
267
229
  /**
268
230
  */
269
231
  export const OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
@@ -1443,31 +1405,14 @@ function __wbg_get_imports() {
1443
1405
  const ret = getStringFromWasm0(arg0, arg1);
1444
1406
  return addHeapObject(ret);
1445
1407
  };
1446
- imports.wbg.__wbindgen_is_function = function(arg0) {
1447
- const ret = typeof(getObject(arg0)) === 'function';
1448
- return ret;
1449
- };
1450
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1451
- const ret = getObject(arg0);
1452
- return addHeapObject(ret);
1453
- };
1454
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
1455
- const obj = takeObject(arg0).original;
1456
- if (obj.cnt-- == 1) {
1457
- obj.a = 0;
1458
- return true;
1459
- }
1460
- const ret = false;
1461
- return ret;
1462
- };
1463
- imports.wbg.__wbindgen_number_new = function(arg0) {
1464
- const ret = arg0;
1465
- return addHeapObject(ret);
1466
- };
1467
1408
  imports.wbg.__wbg_outputmodel_new = function(arg0) {
1468
1409
  const ret = OutputModel.__wrap(arg0);
1469
1410
  return addHeapObject(ret);
1470
1411
  };
1412
+ imports.wbg.__wbg_location_new = function(arg0) {
1413
+ const ret = Location.__wrap(arg0);
1414
+ return addHeapObject(ret);
1415
+ };
1471
1416
  imports.wbg.__wbg_eventmodel_new = function(arg0) {
1472
1417
  const ret = EventModel.__wrap(arg0);
1473
1418
  return addHeapObject(ret);
@@ -1476,18 +1421,14 @@ function __wbg_get_imports() {
1476
1421
  const ret = NextInputModel.__wrap(arg0);
1477
1422
  return addHeapObject(ret);
1478
1423
  };
1479
- imports.wbg.__wbg_location_new = function(arg0) {
1480
- const ret = Location.__wrap(arg0);
1424
+ imports.wbg.__wbg_verbosetrackingentitymodel_new = function(arg0) {
1425
+ const ret = VerboseTrackingEntityModel.__wrap(arg0);
1481
1426
  return addHeapObject(ret);
1482
1427
  };
1483
1428
  imports.wbg.__wbg_location_unwrap = function(arg0) {
1484
1429
  const ret = Location.__unwrap(takeObject(arg0));
1485
1430
  return ret;
1486
1431
  };
1487
- imports.wbg.__wbg_verbosetrackingentitymodel_new = function(arg0) {
1488
- const ret = VerboseTrackingEntityModel.__wrap(arg0);
1489
- return addHeapObject(ret);
1490
- };
1491
1432
  imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
1492
1433
  const ret = getObject(arg0).crypto;
1493
1434
  return addHeapObject(ret);
@@ -1517,6 +1458,10 @@ function __wbg_get_imports() {
1517
1458
  const ret = module.require;
1518
1459
  return addHeapObject(ret);
1519
1460
  }, arguments) };
1461
+ imports.wbg.__wbindgen_is_function = function(arg0) {
1462
+ const ret = typeof(getObject(arg0)) === 'function';
1463
+ return ret;
1464
+ };
1520
1465
  imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
1521
1466
  const ret = getObject(arg0).msCrypto;
1522
1467
  return addHeapObject(ret);
@@ -1586,23 +1531,9 @@ function __wbg_get_imports() {
1586
1531
  const ret = getObject(arg0).call(getObject(arg1));
1587
1532
  return addHeapObject(ret);
1588
1533
  }, arguments) };
1589
- imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
1590
- try {
1591
- var state0 = {a: arg0, b: arg1};
1592
- var cb0 = (arg0, arg1) => {
1593
- const a = state0.a;
1594
- state0.a = 0;
1595
- try {
1596
- return __wbg_adapter_151(a, state0.b, arg0, arg1);
1597
- } finally {
1598
- state0.a = a;
1599
- }
1600
- };
1601
- const ret = new Promise(cb0);
1602
- return addHeapObject(ret);
1603
- } finally {
1604
- state0.a = state0.b = 0;
1605
- }
1534
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1535
+ const ret = getObject(arg0);
1536
+ return addHeapObject(ret);
1606
1537
  };
1607
1538
  imports.wbg.__wbg_reject_a778418101c86bc9 = function(arg0) {
1608
1539
  const ret = Promise.reject(getObject(arg0));
@@ -1616,14 +1547,6 @@ function __wbg_get_imports() {
1616
1547
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1617
1548
  return addHeapObject(ret);
1618
1549
  }, arguments) };
1619
- imports.wbg.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1620
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
1621
- return addHeapObject(ret);
1622
- }, arguments) };
1623
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
1624
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
1625
- return addHeapObject(ret);
1626
- }, arguments) };
1627
1550
  imports.wbg.__wbindgen_memory = function() {
1628
1551
  const ret = wasm.memory;
1629
1552
  return addHeapObject(ret);
@@ -1631,10 +1554,6 @@ function __wbg_get_imports() {
1631
1554
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1632
1555
  throw new Error(getStringFromWasm0(arg0, arg1));
1633
1556
  };
1634
- imports.wbg.__wbindgen_closure_wrapper505 = function(arg0, arg1, arg2) {
1635
- const ret = makeMutClosure(arg0, arg1, 19, __wbg_adapter_26);
1636
- return addHeapObject(ret);
1637
- };
1638
1557
 
1639
1558
  return imports;
1640
1559
  }
package/mons-web_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mons-web",
3
3
  "type": "module",
4
4
  "description": "super metal mons",
5
- "version": "0.1.112",
5
+ "version": "0.1.115",
6
6
  "license": "CC0-1.0",
7
7
  "repository": {
8
8
  "type": "git",