mons-rust 0.1.90 → 0.1.93

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-rust.d.ts CHANGED
@@ -10,59 +10,45 @@
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 EventModelKind {
14
- MonMove = 0,
15
- ManaMove = 1,
16
- ManaScored = 2,
17
- MysticAction = 3,
18
- DemonAction = 4,
19
- DemonAdditionalStep = 5,
20
- SpiritTargetMove = 6,
21
- PickupBomb = 7,
22
- PickupPotion = 8,
23
- PickupMana = 9,
24
- MonFainted = 10,
25
- ManaDropped = 11,
26
- SupermanaBackToBase = 12,
27
- BombAttack = 13,
28
- MonAwake = 14,
29
- BombExplosion = 15,
30
- NextTurn = 16,
31
- GameOver = 17,
32
- Takeback = 18,
33
- UsePotion = 19,
13
+ export enum SquareModelKind {
14
+ Regular = 0,
15
+ ConsumableBase = 1,
16
+ SupermanaBase = 2,
17
+ ManaBase = 3,
18
+ ManaPool = 4,
19
+ MonBase = 5,
34
20
  }
35
21
  /**
36
22
  */
37
- export enum OutputModelKind {
38
- InvalidInput = 0,
39
- LocationsToStartFrom = 1,
40
- NextInputOptions = 2,
41
- Events = 3,
23
+ export enum Modifier {
24
+ SelectPotion = 0,
25
+ SelectBomb = 1,
26
+ Cancel = 2,
42
27
  }
43
28
  /**
44
29
  */
45
- export enum ItemModelKind {
46
- Mon = 0,
47
- Mana = 1,
48
- MonWithMana = 2,
49
- MonWithConsumable = 3,
50
- Consumable = 4,
30
+ export enum Color {
31
+ White = 0,
32
+ Black = 1,
51
33
  }
52
34
  /**
53
35
  */
54
- export enum AvailableMoveKind {
36
+ export enum NextInputKind {
55
37
  MonMove = 0,
56
38
  ManaMove = 1,
57
- Action = 2,
58
- Potion = 3,
39
+ MysticAction = 2,
40
+ DemonAction = 3,
41
+ DemonAdditionalStep = 4,
42
+ SpiritTargetCapture = 5,
43
+ SpiritTargetMove = 6,
44
+ SelectConsumable = 7,
45
+ BombAttack = 8,
59
46
  }
60
47
  /**
61
48
  */
62
- export enum Modifier {
63
- SelectPotion = 0,
64
- SelectBomb = 1,
65
- Cancel = 2,
49
+ export enum ManaKind {
50
+ Regular = 0,
51
+ Supermana = 1,
66
52
  }
67
53
  /**
68
54
  */
@@ -73,9 +59,12 @@ export enum Consumable {
73
59
  }
74
60
  /**
75
61
  */
76
- export enum ManaKind {
77
- Regular = 0,
78
- Supermana = 1,
62
+ export enum ItemModelKind {
63
+ Mon = 0,
64
+ Mana = 1,
65
+ MonWithMana = 2,
66
+ MonWithConsumable = 3,
67
+ Consumable = 4,
79
68
  }
80
69
  /**
81
70
  */
@@ -88,32 +77,43 @@ export enum MonKind {
88
77
  }
89
78
  /**
90
79
  */
91
- export enum SquareModelKind {
92
- Regular = 0,
93
- ConsumableBase = 1,
94
- SupermanaBase = 2,
95
- ManaBase = 3,
96
- ManaPool = 4,
97
- MonBase = 5,
80
+ export enum EventModelKind {
81
+ MonMove = 0,
82
+ ManaMove = 1,
83
+ ManaScored = 2,
84
+ MysticAction = 3,
85
+ DemonAction = 4,
86
+ DemonAdditionalStep = 5,
87
+ SpiritTargetMove = 6,
88
+ PickupBomb = 7,
89
+ PickupPotion = 8,
90
+ PickupMana = 9,
91
+ MonFainted = 10,
92
+ ManaDropped = 11,
93
+ SupermanaBackToBase = 12,
94
+ BombAttack = 13,
95
+ MonAwake = 14,
96
+ BombExplosion = 15,
97
+ NextTurn = 16,
98
+ GameOver = 17,
99
+ Takeback = 18,
100
+ UsePotion = 19,
98
101
  }
99
102
  /**
100
103
  */
101
- export enum NextInputKind {
104
+ export enum AvailableMoveKind {
102
105
  MonMove = 0,
103
106
  ManaMove = 1,
104
- MysticAction = 2,
105
- DemonAction = 3,
106
- DemonAdditionalStep = 4,
107
- SpiritTargetCapture = 5,
108
- SpiritTargetMove = 6,
109
- SelectConsumable = 7,
110
- BombAttack = 8,
107
+ Action = 2,
108
+ Potion = 3,
111
109
  }
112
110
  /**
113
111
  */
114
- export enum Color {
115
- White = 0,
116
- Black = 1,
112
+ export enum OutputModelKind {
113
+ InvalidInput = 0,
114
+ LocationsToStartFrom = 1,
115
+ NextInputOptions = 2,
116
+ Events = 3,
117
117
  }
118
118
  /**
119
119
  */
package/mons-rust.js CHANGED
@@ -7,19 +7,10 @@ const heap = new Array(128).fill(undefined);
7
7
 
8
8
  heap.push(undefined, null, true, false);
9
9
 
10
- let heap_next = heap.length;
11
-
12
- function addHeapObject(obj) {
13
- if (heap_next === heap.length) heap.push(heap.length + 1);
14
- const idx = heap_next;
15
- heap_next = heap[idx];
16
-
17
- heap[idx] = obj;
18
- return idx;
19
- }
20
-
21
10
  function getObject(idx) { return heap[idx]; }
22
11
 
12
+ let heap_next = heap.length;
13
+
23
14
  function dropObject(idx) {
24
15
  if (idx < 132) return;
25
16
  heap[idx] = heap_next;
@@ -50,6 +41,15 @@ function getStringFromWasm0(ptr, len) {
50
41
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
51
42
  }
52
43
 
44
+ function addHeapObject(obj) {
45
+ if (heap_next === heap.length) heap.push(heap.length + 1);
46
+ const idx = heap_next;
47
+ heap_next = heap[idx];
48
+
49
+ heap[idx] = obj;
50
+ return idx;
51
+ }
52
+
53
53
  let WASM_VECTOR_LEN = 0;
54
54
 
55
55
  let cachedTextEncoder = new TextEncoder('utf-8');
@@ -150,7 +150,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
150
150
  return real;
151
151
  }
152
152
  function __wbg_adapter_26(arg0, arg1) {
153
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd0d1345cc69f4a11(arg0, arg1);
153
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h08a1876d4c8ab574(arg0, arg1);
154
154
  }
155
155
 
156
156
  let cachedUint32Memory0 = null;
@@ -239,37 +239,37 @@ function __wbg_adapter_151(arg0, arg1, arg2, arg3) {
239
239
 
240
240
  /**
241
241
  */
242
- module.exports.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", });
242
+ module.exports.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
243
  /**
244
244
  */
245
- module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
245
+ module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
246
246
  /**
247
247
  */
248
- module.exports.ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
248
+ module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
249
249
  /**
250
250
  */
251
- module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
251
+ module.exports.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", });
252
252
  /**
253
253
  */
254
- module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
254
+ module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
255
255
  /**
256
256
  */
257
257
  module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
258
258
  /**
259
259
  */
260
- module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
260
+ module.exports.ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
261
261
  /**
262
262
  */
263
263
  module.exports.MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
264
264
  /**
265
265
  */
266
- module.exports.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", });
266
+ module.exports.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", });
267
267
  /**
268
268
  */
269
- module.exports.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", });
269
+ module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
270
270
  /**
271
271
  */
272
- module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
272
+ module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
273
273
 
274
274
  const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
275
275
  ? { register: () => {}, unregister: () => {} }
@@ -1415,26 +1415,6 @@ class VerboseTrackingEntityModel {
1415
1415
  }
1416
1416
  module.exports.VerboseTrackingEntityModel = VerboseTrackingEntityModel;
1417
1417
 
1418
- module.exports.__wbindgen_number_new = function(arg0) {
1419
- const ret = arg0;
1420
- return addHeapObject(ret);
1421
- };
1422
-
1423
- module.exports.__wbg_eventmodel_new = function(arg0) {
1424
- const ret = EventModel.__wrap(arg0);
1425
- return addHeapObject(ret);
1426
- };
1427
-
1428
- module.exports.__wbg_location_new = function(arg0) {
1429
- const ret = Location.__wrap(arg0);
1430
- return addHeapObject(ret);
1431
- };
1432
-
1433
- module.exports.__wbg_nextinputmodel_new = function(arg0) {
1434
- const ret = NextInputModel.__wrap(arg0);
1435
- return addHeapObject(ret);
1436
- };
1437
-
1438
1418
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
1439
1419
  takeObject(arg0);
1440
1420
  };
@@ -1464,11 +1444,31 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
1464
1444
  return ret;
1465
1445
  };
1466
1446
 
1447
+ module.exports.__wbindgen_number_new = function(arg0) {
1448
+ const ret = arg0;
1449
+ return addHeapObject(ret);
1450
+ };
1451
+
1467
1452
  module.exports.__wbg_outputmodel_new = function(arg0) {
1468
1453
  const ret = OutputModel.__wrap(arg0);
1469
1454
  return addHeapObject(ret);
1470
1455
  };
1471
1456
 
1457
+ module.exports.__wbg_eventmodel_new = function(arg0) {
1458
+ const ret = EventModel.__wrap(arg0);
1459
+ return addHeapObject(ret);
1460
+ };
1461
+
1462
+ module.exports.__wbg_location_new = function(arg0) {
1463
+ const ret = Location.__wrap(arg0);
1464
+ return addHeapObject(ret);
1465
+ };
1466
+
1467
+ module.exports.__wbg_nextinputmodel_new = function(arg0) {
1468
+ const ret = NextInputModel.__wrap(arg0);
1469
+ return addHeapObject(ret);
1470
+ };
1471
+
1472
1472
  module.exports.__wbg_verbosetrackingentitymodel_new = function(arg0) {
1473
1473
  const ret = VerboseTrackingEntityModel.__wrap(arg0);
1474
1474
  return addHeapObject(ret);
@@ -1654,8 +1654,8 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
1654
1654
  throw new Error(getStringFromWasm0(arg0, arg1));
1655
1655
  };
1656
1656
 
1657
- module.exports.__wbindgen_closure_wrapper389 = function(arg0, arg1, arg2) {
1658
- const ret = makeMutClosure(arg0, arg1, 21, __wbg_adapter_26);
1657
+ module.exports.__wbindgen_closure_wrapper353 = function(arg0, arg1, arg2) {
1658
+ const ret = makeMutClosure(arg0, arg1, 14, __wbg_adapter_26);
1659
1659
  return addHeapObject(ret);
1660
1660
  };
1661
1661
 
package/mons-rust_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mons-rust",
3
3
  "description": "super metal mons",
4
- "version": "0.1.90",
4
+ "version": "0.1.93",
5
5
  "license": "CC0-1.0",
6
6
  "repository": {
7
7
  "type": "git",