mons-rust 0.1.56 → 0.1.57

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,16 +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 SquareModelKind {
14
- Regular = 0,
15
- ConsumableBase = 1,
16
- SupermanaBase = 2,
17
- ManaBase = 3,
18
- ManaPool = 4,
19
- MonBase = 5,
20
- }
21
- /**
22
- */
23
13
  export enum ItemModelKind {
24
14
  Mon = 0,
25
15
  Mana = 1,
@@ -35,36 +25,6 @@ export enum ManaKind {
35
25
  }
36
26
  /**
37
27
  */
38
- export enum Consumable {
39
- Potion = 0,
40
- Bomb = 1,
41
- BombOrPotion = 2,
42
- }
43
- /**
44
- */
45
- export enum Color {
46
- White = 0,
47
- Black = 1,
48
- }
49
- /**
50
- */
51
- export enum OutputModelKind {
52
- InvalidInput = 0,
53
- LocationsToStartFrom = 1,
54
- NextInputOptions = 2,
55
- Events = 3,
56
- }
57
- /**
58
- */
59
- export enum MonKind {
60
- Demon = 0,
61
- Drainer = 1,
62
- Angel = 2,
63
- Spirit = 3,
64
- Mystic = 4,
65
- }
66
- /**
67
- */
68
28
  export enum EventModelKind {
69
29
  MonMove = 0,
70
30
  ManaMove = 1,
@@ -89,6 +49,15 @@ export enum EventModelKind {
89
49
  }
90
50
  /**
91
51
  */
52
+ export enum MonKind {
53
+ Demon = 0,
54
+ Drainer = 1,
55
+ Angel = 2,
56
+ Spirit = 3,
57
+ Mystic = 4,
58
+ }
59
+ /**
60
+ */
92
61
  export enum Modifier {
93
62
  SelectPotion = 0,
94
63
  SelectBomb = 1,
@@ -96,6 +65,27 @@ export enum Modifier {
96
65
  }
97
66
  /**
98
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,
78
+ }
79
+ /**
80
+ */
81
+ export enum OutputModelKind {
82
+ InvalidInput = 0,
83
+ LocationsToStartFrom = 1,
84
+ NextInputOptions = 2,
85
+ Events = 3,
86
+ }
87
+ /**
88
+ */
99
89
  export enum NextInputKind {
100
90
  MonMove = 0,
101
91
  ManaMove = 1,
@@ -109,6 +99,16 @@ export enum NextInputKind {
109
99
  }
110
100
  /**
111
101
  */
102
+ export enum SquareModelKind {
103
+ Regular = 0,
104
+ ConsumableBase = 1,
105
+ SupermanaBase = 2,
106
+ ManaBase = 3,
107
+ ManaPool = 4,
108
+ MonBase = 5,
109
+ }
110
+ /**
111
+ */
112
112
  export enum AvailableMoveKind {
113
113
  MonMove = 0,
114
114
  ManaMove = 1,
@@ -230,6 +230,10 @@ export class MonsGameModel {
230
230
  */
231
231
  static from_fen(fen: string): MonsGameModel | undefined;
232
232
  /**
233
+ * @returns {MonsGameModel | undefined}
234
+ */
235
+ without_last_turn(): MonsGameModel | undefined;
236
+ /**
233
237
  * @returns {string}
234
238
  */
235
239
  fen(): string;
package/mons-rust.js CHANGED
@@ -201,36 +201,36 @@ function handleError(f, args) {
201
201
  }
202
202
  /**
203
203
  */
204
- 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", });
205
- /**
206
- */
207
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", });
208
205
  /**
209
206
  */
210
207
  module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
211
208
  /**
212
209
  */
213
- module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
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", });
214
211
  /**
215
212
  */
216
- module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
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", });
217
214
  /**
218
215
  */
219
- module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
216
+ module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
220
217
  /**
221
218
  */
222
- 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", });
219
+ module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
223
220
  /**
224
221
  */
225
- 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", });
222
+ module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
226
223
  /**
227
224
  */
228
- module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
225
+ module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
229
226
  /**
230
227
  */
231
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", });
232
229
  /**
233
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", });
232
+ /**
233
+ */
234
234
  module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
235
235
 
236
236
  const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -734,6 +734,13 @@ class MonsGameModel {
734
734
  return ret === 0 ? undefined : MonsGameModel.__wrap(ret);
735
735
  }
736
736
  /**
737
+ * @returns {MonsGameModel | undefined}
738
+ */
739
+ without_last_turn() {
740
+ const ret = wasm.monsgamemodel_without_last_turn(this.__wbg_ptr);
741
+ return ret === 0 ? undefined : MonsGameModel.__wrap(ret);
742
+ }
743
+ /**
737
744
  * @returns {string}
738
745
  */
739
746
  fen() {
@@ -1294,8 +1301,8 @@ class VerboseTrackingEntityModel {
1294
1301
  }
1295
1302
  module.exports.VerboseTrackingEntityModel = VerboseTrackingEntityModel;
1296
1303
 
1297
- module.exports.__wbg_eventmodel_new = function(arg0) {
1298
- const ret = EventModel.__wrap(arg0);
1304
+ module.exports.__wbg_nextinputmodel_new = function(arg0) {
1305
+ const ret = NextInputModel.__wrap(arg0);
1299
1306
  return addHeapObject(ret);
1300
1307
  };
1301
1308
 
@@ -1304,8 +1311,8 @@ module.exports.__wbg_location_new = function(arg0) {
1304
1311
  return addHeapObject(ret);
1305
1312
  };
1306
1313
 
1307
- module.exports.__wbg_nextinputmodel_new = function(arg0) {
1308
- const ret = NextInputModel.__wrap(arg0);
1314
+ module.exports.__wbg_eventmodel_new = function(arg0) {
1315
+ const ret = EventModel.__wrap(arg0);
1309
1316
  return addHeapObject(ret);
1310
1317
  };
1311
1318
 
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.56",
4
+ "version": "0.1.57",
5
5
  "license": "CC0-1.0",
6
6
  "repository": {
7
7
  "type": "git",