mons-rust 0.1.57 → 0.1.58

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,6 +10,20 @@
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 Color {
14
+ White = 0,
15
+ Black = 1,
16
+ }
17
+ /**
18
+ */
19
+ export enum AvailableMoveKind {
20
+ MonMove = 0,
21
+ ManaMove = 1,
22
+ Action = 2,
23
+ Potion = 3,
24
+ }
25
+ /**
26
+ */
13
27
  export enum ItemModelKind {
14
28
  Mon = 0,
15
29
  Mana = 1,
@@ -19,9 +33,19 @@ export enum ItemModelKind {
19
33
  }
20
34
  /**
21
35
  */
22
- export enum ManaKind {
23
- Regular = 0,
24
- Supermana = 1,
36
+ export enum Modifier {
37
+ SelectPotion = 0,
38
+ SelectBomb = 1,
39
+ Cancel = 2,
40
+ }
41
+ /**
42
+ */
43
+ export enum MonKind {
44
+ Demon = 0,
45
+ Drainer = 1,
46
+ Angel = 2,
47
+ Spirit = 3,
48
+ Mystic = 4,
25
49
  }
26
50
  /**
27
51
  */
@@ -49,40 +73,19 @@ export enum EventModelKind {
49
73
  }
50
74
  /**
51
75
  */
52
- export enum MonKind {
53
- Demon = 0,
54
- Drainer = 1,
55
- Angel = 2,
56
- Spirit = 3,
57
- Mystic = 4,
58
- }
59
- /**
60
- */
61
- export enum Modifier {
62
- SelectPotion = 0,
63
- SelectBomb = 1,
64
- Cancel = 2,
65
- }
66
- /**
67
- */
68
- export enum Consumable {
69
- Potion = 0,
70
- Bomb = 1,
71
- BombOrPotion = 2,
72
- }
73
- /**
74
- */
75
- export enum Color {
76
- White = 0,
77
- Black = 1,
76
+ export enum SquareModelKind {
77
+ Regular = 0,
78
+ ConsumableBase = 1,
79
+ SupermanaBase = 2,
80
+ ManaBase = 3,
81
+ ManaPool = 4,
82
+ MonBase = 5,
78
83
  }
79
84
  /**
80
85
  */
81
- export enum OutputModelKind {
82
- InvalidInput = 0,
83
- LocationsToStartFrom = 1,
84
- NextInputOptions = 2,
85
- Events = 3,
86
+ export enum ManaKind {
87
+ Regular = 0,
88
+ Supermana = 1,
86
89
  }
87
90
  /**
88
91
  */
@@ -99,21 +102,18 @@ export enum NextInputKind {
99
102
  }
100
103
  /**
101
104
  */
102
- export enum SquareModelKind {
103
- Regular = 0,
104
- ConsumableBase = 1,
105
- SupermanaBase = 2,
106
- ManaBase = 3,
107
- ManaPool = 4,
108
- MonBase = 5,
105
+ export enum OutputModelKind {
106
+ InvalidInput = 0,
107
+ LocationsToStartFrom = 1,
108
+ NextInputOptions = 2,
109
+ Events = 3,
109
110
  }
110
111
  /**
111
112
  */
112
- export enum AvailableMoveKind {
113
- MonMove = 0,
114
- ManaMove = 1,
115
- Action = 2,
116
- Potion = 3,
113
+ export enum Consumable {
114
+ Potion = 0,
115
+ Bomb = 1,
116
+ BombOrPotion = 2,
117
117
  }
118
118
  /**
119
119
  */
@@ -398,4 +398,8 @@ export class VerboseTrackingEntityModel {
398
398
  * @returns {(EventModel)[]}
399
399
  */
400
400
  events(): (EventModel)[];
401
+ /**
402
+ * @returns {string}
403
+ */
404
+ events_fen(): string;
401
405
  }
package/mons-rust.js CHANGED
@@ -201,37 +201,37 @@ function handleError(f, args) {
201
201
  }
202
202
  /**
203
203
  */
204
- 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", });
204
+ module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
205
205
  /**
206
206
  */
207
- module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
207
+ module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
208
208
  /**
209
209
  */
210
- 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", });
210
+ 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", });
211
211
  /**
212
212
  */
213
- 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", });
213
+ module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
214
214
  /**
215
215
  */
216
- module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
216
+ 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", });
217
217
  /**
218
218
  */
219
- module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
219
+ 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", });
220
220
  /**
221
221
  */
222
- module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
222
+ 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", });
223
223
  /**
224
224
  */
225
- module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
225
+ module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
226
226
  /**
227
227
  */
228
228
  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", });
229
229
  /**
230
230
  */
231
- 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", });
231
+ module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
232
232
  /**
233
233
  */
234
- module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
234
+ module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
235
235
 
236
236
  const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
237
237
  ? { register: () => {}, unregister: () => {} }
@@ -1298,16 +1298,35 @@ class VerboseTrackingEntityModel {
1298
1298
  wasm.__wbindgen_add_to_stack_pointer(16);
1299
1299
  }
1300
1300
  }
1301
+ /**
1302
+ * @returns {string}
1303
+ */
1304
+ events_fen() {
1305
+ let deferred1_0;
1306
+ let deferred1_1;
1307
+ try {
1308
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1309
+ wasm.verbosetrackingentitymodel_events_fen(retptr, this.__wbg_ptr);
1310
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1311
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1312
+ deferred1_0 = r0;
1313
+ deferred1_1 = r1;
1314
+ return getStringFromWasm0(r0, r1);
1315
+ } finally {
1316
+ wasm.__wbindgen_add_to_stack_pointer(16);
1317
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1318
+ }
1319
+ }
1301
1320
  }
1302
1321
  module.exports.VerboseTrackingEntityModel = VerboseTrackingEntityModel;
1303
1322
 
1304
- module.exports.__wbg_nextinputmodel_new = function(arg0) {
1305
- const ret = NextInputModel.__wrap(arg0);
1323
+ module.exports.__wbg_location_new = function(arg0) {
1324
+ const ret = Location.__wrap(arg0);
1306
1325
  return addHeapObject(ret);
1307
1326
  };
1308
1327
 
1309
- module.exports.__wbg_location_new = function(arg0) {
1310
- const ret = Location.__wrap(arg0);
1328
+ module.exports.__wbg_nextinputmodel_new = function(arg0) {
1329
+ const ret = NextInputModel.__wrap(arg0);
1311
1330
  return addHeapObject(ret);
1312
1331
  };
1313
1332
 
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.57",
4
+ "version": "0.1.58",
5
5
  "license": "CC0-1.0",
6
6
  "repository": {
7
7
  "type": "git",