mons-rust 0.1.82 → 0.1.84

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/README.md CHANGED
@@ -5,6 +5,28 @@ or
5
5
 
6
6
  `npm install mons-rust`
7
7
 
8
+ ## rules-tests runner
9
+
10
+ Run all fixtures in `rules-tests`:
11
+
12
+ `./scripts/run-rules-tests.sh`
13
+
14
+ Useful options:
15
+
16
+ `./scripts/run-rules-tests.sh --limit 100`
17
+
18
+ `./scripts/run-rules-tests.sh --log /tmp/rules-tests.log`
19
+
20
+ ## rules-tests generator
21
+
22
+ Generate new random unique fixtures in `rules-tests`:
23
+
24
+ `./scripts/generate-rules-tests.sh --target-new 100`
25
+
26
+ Run continuously until interrupted:
27
+
28
+ `./scripts/generate-rules-tests.sh`
29
+
8
30
  ## publishing to npm
9
31
 
10
- `./publish.sh`
32
+ `./publish.sh`
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,
@@ -44,19 +34,27 @@ export enum AvailableMoveKind {
44
34
  }
45
35
  /**
46
36
  */
47
- export enum MonKind {
48
- Demon = 0,
49
- Drainer = 1,
50
- Angel = 2,
51
- Spirit = 3,
52
- Mystic = 4,
37
+ export enum OutputModelKind {
38
+ InvalidInput = 0,
39
+ LocationsToStartFrom = 1,
40
+ NextInputOptions = 2,
41
+ Events = 3,
53
42
  }
54
43
  /**
55
44
  */
56
- export enum Modifier {
57
- SelectPotion = 0,
58
- SelectBomb = 1,
59
- Cancel = 2,
45
+ export enum SquareModelKind {
46
+ Regular = 0,
47
+ ConsumableBase = 1,
48
+ SupermanaBase = 2,
49
+ ManaBase = 3,
50
+ ManaPool = 4,
51
+ MonBase = 5,
52
+ }
53
+ /**
54
+ */
55
+ export enum Color {
56
+ White = 0,
57
+ Black = 1,
60
58
  }
61
59
  /**
62
60
  */
@@ -73,20 +71,6 @@ export enum NextInputKind {
73
71
  }
74
72
  /**
75
73
  */
76
- export enum Color {
77
- White = 0,
78
- Black = 1,
79
- }
80
- /**
81
- */
82
- export enum OutputModelKind {
83
- InvalidInput = 0,
84
- LocationsToStartFrom = 1,
85
- NextInputOptions = 2,
86
- Events = 3,
87
- }
88
- /**
89
- */
90
74
  export enum EventModelKind {
91
75
  MonMove = 0,
92
76
  ManaMove = 1,
@@ -111,6 +95,22 @@ export enum EventModelKind {
111
95
  }
112
96
  /**
113
97
  */
98
+ export enum Modifier {
99
+ SelectPotion = 0,
100
+ SelectBomb = 1,
101
+ Cancel = 2,
102
+ }
103
+ /**
104
+ */
105
+ export enum MonKind {
106
+ Demon = 0,
107
+ Drainer = 1,
108
+ Angel = 2,
109
+ Spirit = 3,
110
+ Mystic = 4,
111
+ }
112
+ /**
113
+ */
114
114
  export enum ManaKind {
115
115
  Regular = 0,
116
116
  Supermana = 1,
package/mons-rust.js CHANGED
@@ -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__h3fb1aa55fa18b074(arg0, arg1);
153
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd118e63d1b16d9ab(arg0, arg1);
154
154
  }
155
155
 
156
156
  let cachedUint32Memory0 = null;
@@ -237,9 +237,6 @@ function __wbg_adapter_152(arg0, arg1, arg2, arg3) {
237
237
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h6cfc31b0a14c9fbd(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
238
238
  }
239
239
 
240
- /**
241
- */
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
240
  /**
244
241
  */
245
242
  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", });
@@ -251,22 +248,25 @@ module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bo
251
248
  module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
252
249
  /**
253
250
  */
254
- 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", });
251
+ module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
255
252
  /**
256
253
  */
257
- module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
254
+ 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", });
255
+ /**
256
+ */
257
+ module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
258
258
  /**
259
259
  */
260
260
  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", });
261
261
  /**
262
262
  */
263
- module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
263
+ 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", });
264
264
  /**
265
265
  */
266
- module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
266
+ module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
267
267
  /**
268
268
  */
269
- 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", });
269
+ 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", });
270
270
  /**
271
271
  */
272
272
  module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
@@ -689,14 +689,14 @@ class Mon {
689
689
  * @returns {number}
690
690
  */
691
691
  get cooldown() {
692
- const ret = wasm.__wbg_get_location_i(this.__wbg_ptr);
692
+ const ret = wasm.__wbg_get_mon_cooldown(this.__wbg_ptr);
693
693
  return ret;
694
694
  }
695
695
  /**
696
696
  * @param {number} arg0
697
697
  */
698
698
  set cooldown(arg0) {
699
- wasm.__wbg_set_location_i(this.__wbg_ptr, arg0);
699
+ wasm.__wbg_set_mon_cooldown(this.__wbg_ptr, arg0);
700
700
  }
701
701
  /**
702
702
  * @returns {boolean}
@@ -1421,8 +1421,8 @@ class VerboseTrackingEntityModel {
1421
1421
  }
1422
1422
  module.exports.VerboseTrackingEntityModel = VerboseTrackingEntityModel;
1423
1423
 
1424
- module.exports.__wbindgen_number_new = function(arg0) {
1425
- const ret = arg0;
1424
+ module.exports.__wbg_nextinputmodel_new = function(arg0) {
1425
+ const ret = NextInputModel.__wrap(arg0);
1426
1426
  return addHeapObject(ret);
1427
1427
  };
1428
1428
 
@@ -1431,8 +1431,8 @@ module.exports.__wbg_location_new = function(arg0) {
1431
1431
  return addHeapObject(ret);
1432
1432
  };
1433
1433
 
1434
- module.exports.__wbg_nextinputmodel_new = function(arg0) {
1435
- const ret = NextInputModel.__wrap(arg0);
1434
+ module.exports.__wbindgen_number_new = function(arg0) {
1435
+ const ret = arg0;
1436
1436
  return addHeapObject(ret);
1437
1437
  };
1438
1438
 
@@ -1655,8 +1655,8 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
1655
1655
  throw new Error(getStringFromWasm0(arg0, arg1));
1656
1656
  };
1657
1657
 
1658
- module.exports.__wbindgen_closure_wrapper379 = function(arg0, arg1, arg2) {
1659
- const ret = makeMutClosure(arg0, arg1, 23, __wbg_adapter_26);
1658
+ module.exports.__wbindgen_closure_wrapper306 = function(arg0, arg1, arg2) {
1659
+ const ret = makeMutClosure(arg0, arg1, 11, __wbg_adapter_26);
1660
1660
  return addHeapObject(ret);
1661
1661
  };
1662
1662
 
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.82",
4
+ "version": "0.1.84",
5
5
  "license": "CC0-1.0",
6
6
  "repository": {
7
7
  "type": "git",