mons-rust 0.1.133 → 0.1.134
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 +7 -0
- package/mons-rust.d.ts +48 -48
- package/mons-rust.js +11 -11
- package/mons-rust_bg.wasm +0 -0
- package/package.json +4 -3
- package/snippets/mons-rust-cba9eedc04d5b215/inline0.js +1 -0
package/README.md
CHANGED
|
@@ -24,6 +24,13 @@ Experiments use a small candidate-specific `#[cfg(test)]` harness:
|
|
|
24
24
|
- `cargo test --release --lib <test_name> -- --ignored --nocapture --test-threads=1`
|
|
25
25
|
- `./scripts/check-automove-hygiene.sh`
|
|
26
26
|
|
|
27
|
+
## Real-player complete games
|
|
28
|
+
|
|
29
|
+
The immutable, move-only corpus of 1,527 complete games played by real players is
|
|
30
|
+
documented in [test-data/complete-games/v1](https://github.com/supermetalmons/mons-rust/tree/main/test-data/complete-games/v1).
|
|
31
|
+
It is repository research data, not part of the Rust or npm package surface. Run
|
|
32
|
+
`node ./scripts/check-complete-games.cjs` to verify its pinned bytes and schema.
|
|
33
|
+
|
|
27
34
|
## Rules Tests
|
|
28
35
|
|
|
29
36
|
Runner:
|
package/mons-rust.d.ts
CHANGED
|
@@ -10,22 +10,37 @@
|
|
|
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
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Angel = 2,
|
|
17
|
-
Spirit = 3,
|
|
18
|
-
Mystic = 4,
|
|
13
|
+
export enum Color {
|
|
14
|
+
White = 0,
|
|
15
|
+
Black = 1,
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
*/
|
|
22
|
-
export enum
|
|
19
|
+
export enum ManaKind {
|
|
23
20
|
Regular = 0,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
Supermana = 1,
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*/
|
|
25
|
+
export enum ItemModelKind {
|
|
26
|
+
Mon = 0,
|
|
27
|
+
Mana = 1,
|
|
28
|
+
MonWithMana = 2,
|
|
29
|
+
MonWithConsumable = 3,
|
|
30
|
+
Consumable = 4,
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
*/
|
|
34
|
+
export enum NextInputKind {
|
|
35
|
+
MonMove = 0,
|
|
36
|
+
ManaMove = 1,
|
|
37
|
+
MysticAction = 2,
|
|
38
|
+
DemonAction = 3,
|
|
39
|
+
DemonAdditionalStep = 4,
|
|
40
|
+
SpiritTargetCapture = 5,
|
|
41
|
+
SpiritTargetMove = 6,
|
|
42
|
+
SelectConsumable = 7,
|
|
43
|
+
BombAttack = 8,
|
|
29
44
|
}
|
|
30
45
|
/**
|
|
31
46
|
*/
|
|
@@ -36,14 +51,6 @@ export enum Modifier {
|
|
|
36
51
|
}
|
|
37
52
|
/**
|
|
38
53
|
*/
|
|
39
|
-
export enum OutputModelKind {
|
|
40
|
-
InvalidInput = 0,
|
|
41
|
-
LocationsToStartFrom = 1,
|
|
42
|
-
NextInputOptions = 2,
|
|
43
|
-
Events = 3,
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
*/
|
|
47
54
|
export enum GameVariant {
|
|
48
55
|
Classic = 0,
|
|
49
56
|
SwappedManaRows = 1,
|
|
@@ -60,38 +67,30 @@ export enum GameVariant {
|
|
|
60
67
|
}
|
|
61
68
|
/**
|
|
62
69
|
*/
|
|
63
|
-
export enum
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
*/
|
|
70
|
-
export enum NextInputKind {
|
|
71
|
-
MonMove = 0,
|
|
72
|
-
ManaMove = 1,
|
|
73
|
-
MysticAction = 2,
|
|
74
|
-
DemonAction = 3,
|
|
75
|
-
DemonAdditionalStep = 4,
|
|
76
|
-
SpiritTargetCapture = 5,
|
|
77
|
-
SpiritTargetMove = 6,
|
|
78
|
-
SelectConsumable = 7,
|
|
79
|
-
BombAttack = 8,
|
|
70
|
+
export enum OutputModelKind {
|
|
71
|
+
InvalidInput = 0,
|
|
72
|
+
LocationsToStartFrom = 1,
|
|
73
|
+
NextInputOptions = 2,
|
|
74
|
+
Events = 3,
|
|
80
75
|
}
|
|
81
76
|
/**
|
|
82
77
|
*/
|
|
83
|
-
export enum
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
78
|
+
export enum MonKind {
|
|
79
|
+
Demon = 0,
|
|
80
|
+
Drainer = 1,
|
|
81
|
+
Angel = 2,
|
|
82
|
+
Spirit = 3,
|
|
83
|
+
Mystic = 4,
|
|
89
84
|
}
|
|
90
85
|
/**
|
|
91
86
|
*/
|
|
92
|
-
export enum
|
|
87
|
+
export enum SquareModelKind {
|
|
93
88
|
Regular = 0,
|
|
94
|
-
|
|
89
|
+
ConsumableBase = 1,
|
|
90
|
+
SupermanaBase = 2,
|
|
91
|
+
ManaBase = 3,
|
|
92
|
+
ManaPool = 4,
|
|
93
|
+
MonBase = 5,
|
|
95
94
|
}
|
|
96
95
|
/**
|
|
97
96
|
*/
|
|
@@ -127,9 +126,10 @@ export enum AvailableMoveKind {
|
|
|
127
126
|
}
|
|
128
127
|
/**
|
|
129
128
|
*/
|
|
130
|
-
export enum
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
export enum Consumable {
|
|
130
|
+
Potion = 0,
|
|
131
|
+
Bomb = 1,
|
|
132
|
+
BombOrPotion = 2,
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
*/
|
package/mons-rust.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let imports = {};
|
|
2
|
-
imports['./snippets/mons-rust-
|
|
2
|
+
imports['./snippets/mons-rust-cba9eedc04d5b215/inline0.js'] = require('./snippets/mons-rust-cba9eedc04d5b215/inline0.js');
|
|
3
3
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
4
|
let wasm;
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
@@ -202,31 +202,31 @@ function handleError(f, args) {
|
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
204
|
*/
|
|
205
|
-
module.exports.
|
|
205
|
+
module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
|
|
206
206
|
/**
|
|
207
207
|
*/
|
|
208
|
-
module.exports.
|
|
208
|
+
module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
209
209
|
/**
|
|
210
210
|
*/
|
|
211
|
-
module.exports.
|
|
211
|
+
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", });
|
|
212
212
|
/**
|
|
213
213
|
*/
|
|
214
|
-
module.exports.
|
|
214
|
+
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", });
|
|
215
215
|
/**
|
|
216
216
|
*/
|
|
217
|
-
module.exports.
|
|
217
|
+
module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
|
|
218
218
|
/**
|
|
219
219
|
*/
|
|
220
|
-
module.exports.
|
|
220
|
+
module.exports.GameVariant = Object.freeze({ Classic:0,"0":"Classic",SwappedManaRows:1,"1":"SwappedManaRows",OffsetArcManaRows:2,"2":"OffsetArcManaRows",CenterSpokeManaRows:3,"3":"CenterSpokeManaRows",AlternatingManaRows:4,"4":"AlternatingManaRows",InnerWedgeManaRows:5,"5":"InnerWedgeManaRows",OuterWedgeManaRows:6,"6":"OuterWedgeManaRows",BentCenterManaRows:7,"7":"BentCenterManaRows",OuterEdgeManaRows:8,"8":"OuterEdgeManaRows",SplitFlankManaRows:9,"9":"SplitFlankManaRows",ForwardBridgeManaRows:10,"10":"ForwardBridgeManaRows",CornerChainManaRows:11,"11":"CornerChainManaRows", });
|
|
221
221
|
/**
|
|
222
222
|
*/
|
|
223
|
-
module.exports.
|
|
223
|
+
module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
224
224
|
/**
|
|
225
225
|
*/
|
|
226
|
-
module.exports.
|
|
226
|
+
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", });
|
|
227
227
|
/**
|
|
228
228
|
*/
|
|
229
|
-
module.exports.
|
|
229
|
+
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", });
|
|
230
230
|
/**
|
|
231
231
|
*/
|
|
232
232
|
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", });
|
|
@@ -235,7 +235,7 @@ module.exports.EventModelKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove
|
|
|
235
235
|
module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
|
|
236
236
|
/**
|
|
237
237
|
*/
|
|
238
|
-
module.exports.
|
|
238
|
+
module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
|
|
239
239
|
|
|
240
240
|
const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
241
241
|
? { register: () => {}, unregister: () => {} }
|
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.
|
|
4
|
+
"version": "0.1.134",
|
|
5
5
|
"license": "CC0-1.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"mons-rust_bg.wasm",
|
|
12
12
|
"mons-rust.js",
|
|
13
|
-
"mons-rust.d.ts"
|
|
13
|
+
"mons-rust.d.ts",
|
|
14
|
+
"snippets"
|
|
14
15
|
],
|
|
15
16
|
"main": "mons-rust.js",
|
|
16
17
|
"types": "mons-rust.d.ts"
|
|
17
|
-
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function automove_monotonic_now_ms() { return globalThis.performance.now(); }
|