mons-web 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-web.d.ts +67 -67
- package/mons-web.js +14 -14
- package/mons-web_bg.wasm +0 -0
- package/package.json +3 -2
- 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-web.d.ts
CHANGED
|
@@ -10,10 +10,43 @@
|
|
|
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
|
-
|
|
13
|
+
export enum GameVariant {
|
|
14
|
+
Classic = 0,
|
|
15
|
+
SwappedManaRows = 1,
|
|
16
|
+
OffsetArcManaRows = 2,
|
|
17
|
+
CenterSpokeManaRows = 3,
|
|
18
|
+
AlternatingManaRows = 4,
|
|
19
|
+
InnerWedgeManaRows = 5,
|
|
20
|
+
OuterWedgeManaRows = 6,
|
|
21
|
+
BentCenterManaRows = 7,
|
|
22
|
+
OuterEdgeManaRows = 8,
|
|
23
|
+
SplitFlankManaRows = 9,
|
|
24
|
+
ForwardBridgeManaRows = 10,
|
|
25
|
+
CornerChainManaRows = 11,
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*/
|
|
29
|
+
export enum MonKind {
|
|
30
|
+
Demon = 0,
|
|
31
|
+
Drainer = 1,
|
|
32
|
+
Angel = 2,
|
|
33
|
+
Spirit = 3,
|
|
34
|
+
Mystic = 4,
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
*/
|
|
38
|
+
export enum Modifier {
|
|
39
|
+
SelectPotion = 0,
|
|
40
|
+
SelectBomb = 1,
|
|
41
|
+
Cancel = 2,
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
*/
|
|
45
|
+
export enum OutputModelKind {
|
|
46
|
+
InvalidInput = 0,
|
|
47
|
+
LocationsToStartFrom = 1,
|
|
48
|
+
NextInputOptions = 2,
|
|
49
|
+
Events = 3,
|
|
17
50
|
}
|
|
18
51
|
/**
|
|
19
52
|
*/
|
|
@@ -26,33 +59,41 @@ export enum ItemModelKind {
|
|
|
26
59
|
}
|
|
27
60
|
/**
|
|
28
61
|
*/
|
|
29
|
-
export enum
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Potion = 3,
|
|
62
|
+
export enum Consumable {
|
|
63
|
+
Potion = 0,
|
|
64
|
+
Bomb = 1,
|
|
65
|
+
BombOrPotion = 2,
|
|
34
66
|
}
|
|
35
67
|
/**
|
|
36
68
|
*/
|
|
37
|
-
export enum
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
69
|
+
export enum SquareModelKind {
|
|
70
|
+
Regular = 0,
|
|
71
|
+
ConsumableBase = 1,
|
|
72
|
+
SupermanaBase = 2,
|
|
73
|
+
ManaBase = 3,
|
|
74
|
+
ManaPool = 4,
|
|
75
|
+
MonBase = 5,
|
|
43
76
|
}
|
|
44
77
|
/**
|
|
45
78
|
*/
|
|
46
|
-
export enum
|
|
47
|
-
|
|
48
|
-
|
|
79
|
+
export enum AvailableMoveKind {
|
|
80
|
+
MonMove = 0,
|
|
81
|
+
ManaMove = 1,
|
|
82
|
+
Action = 2,
|
|
83
|
+
Potion = 3,
|
|
49
84
|
}
|
|
50
85
|
/**
|
|
51
86
|
*/
|
|
52
|
-
export enum
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
87
|
+
export enum NextInputKind {
|
|
88
|
+
MonMove = 0,
|
|
89
|
+
ManaMove = 1,
|
|
90
|
+
MysticAction = 2,
|
|
91
|
+
DemonAction = 3,
|
|
92
|
+
DemonAdditionalStep = 4,
|
|
93
|
+
SpiritTargetCapture = 5,
|
|
94
|
+
SpiritTargetMove = 6,
|
|
95
|
+
SelectConsumable = 7,
|
|
96
|
+
BombAttack = 8,
|
|
56
97
|
}
|
|
57
98
|
/**
|
|
58
99
|
*/
|
|
@@ -86,50 +127,9 @@ export enum EventModelKind {
|
|
|
86
127
|
}
|
|
87
128
|
/**
|
|
88
129
|
*/
|
|
89
|
-
export enum
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
NextInputOptions = 2,
|
|
93
|
-
Events = 3,
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
*/
|
|
97
|
-
export enum NextInputKind {
|
|
98
|
-
MonMove = 0,
|
|
99
|
-
ManaMove = 1,
|
|
100
|
-
MysticAction = 2,
|
|
101
|
-
DemonAction = 3,
|
|
102
|
-
DemonAdditionalStep = 4,
|
|
103
|
-
SpiritTargetCapture = 5,
|
|
104
|
-
SpiritTargetMove = 6,
|
|
105
|
-
SelectConsumable = 7,
|
|
106
|
-
BombAttack = 8,
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
*/
|
|
110
|
-
export enum SquareModelKind {
|
|
111
|
-
Regular = 0,
|
|
112
|
-
ConsumableBase = 1,
|
|
113
|
-
SupermanaBase = 2,
|
|
114
|
-
ManaBase = 3,
|
|
115
|
-
ManaPool = 4,
|
|
116
|
-
MonBase = 5,
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
*/
|
|
120
|
-
export enum GameVariant {
|
|
121
|
-
Classic = 0,
|
|
122
|
-
SwappedManaRows = 1,
|
|
123
|
-
OffsetArcManaRows = 2,
|
|
124
|
-
CenterSpokeManaRows = 3,
|
|
125
|
-
AlternatingManaRows = 4,
|
|
126
|
-
InnerWedgeManaRows = 5,
|
|
127
|
-
OuterWedgeManaRows = 6,
|
|
128
|
-
BentCenterManaRows = 7,
|
|
129
|
-
OuterEdgeManaRows = 8,
|
|
130
|
-
SplitFlankManaRows = 9,
|
|
131
|
-
ForwardBridgeManaRows = 10,
|
|
132
|
-
CornerChainManaRows = 11,
|
|
130
|
+
export enum Color {
|
|
131
|
+
White = 0,
|
|
132
|
+
Black = 1,
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
*/
|
|
@@ -555,9 +555,9 @@ export interface InitOutput {
|
|
|
555
555
|
readonly verbosetrackingentitymodel_fen: (a: number, b: number) => void;
|
|
556
556
|
readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
557
557
|
readonly __wbg_set_nextinputmodel_location: (a: number, b: number) => void;
|
|
558
|
+
readonly __wbg_set_mon_cooldown: (a: number, b: number) => void;
|
|
558
559
|
readonly __wbg_get_mon_cooldown: (a: number) => number;
|
|
559
560
|
readonly __wbg_get_nextinputmodel_location: (a: number) => number;
|
|
560
|
-
readonly __wbg_set_mon_cooldown: (a: number, b: number) => void;
|
|
561
561
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
562
562
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
563
563
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
package/mons-web.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as __wbg_star0 from './snippets/mons-rust-
|
|
1
|
+
import * as __wbg_star0 from './snippets/mons-rust-cba9eedc04d5b215/inline0.js';
|
|
2
2
|
|
|
3
3
|
let wasm;
|
|
4
4
|
|
|
@@ -200,40 +200,40 @@ function handleError(f, args) {
|
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
202
|
*/
|
|
203
|
-
export const
|
|
203
|
+
export const 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", });
|
|
204
204
|
/**
|
|
205
205
|
*/
|
|
206
|
-
export const
|
|
206
|
+
export const MonKind = Object.freeze({ Demon:0,"0":"Demon",Drainer:1,"1":"Drainer",Angel:2,"2":"Angel",Spirit:3,"3":"Spirit",Mystic:4,"4":"Mystic", });
|
|
207
207
|
/**
|
|
208
208
|
*/
|
|
209
|
-
export const
|
|
209
|
+
export const Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
|
|
210
210
|
/**
|
|
211
211
|
*/
|
|
212
|
-
export const
|
|
212
|
+
export const OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
213
213
|
/**
|
|
214
214
|
*/
|
|
215
|
-
export const
|
|
215
|
+
export const ItemModelKind = Object.freeze({ Mon:0,"0":"Mon",Mana:1,"1":"Mana",MonWithMana:2,"2":"MonWithMana",MonWithConsumable:3,"3":"MonWithConsumable",Consumable:4,"4":"Consumable", });
|
|
216
216
|
/**
|
|
217
217
|
*/
|
|
218
|
-
export const
|
|
218
|
+
export const Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
|
|
219
219
|
/**
|
|
220
220
|
*/
|
|
221
|
-
export const
|
|
221
|
+
export const 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", });
|
|
222
222
|
/**
|
|
223
223
|
*/
|
|
224
|
-
export const
|
|
224
|
+
export const AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
|
|
225
225
|
/**
|
|
226
226
|
*/
|
|
227
|
-
export const
|
|
227
|
+
export const 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", });
|
|
228
228
|
/**
|
|
229
229
|
*/
|
|
230
|
-
export const
|
|
230
|
+
export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
231
231
|
/**
|
|
232
232
|
*/
|
|
233
|
-
export const
|
|
233
|
+
export const 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", });
|
|
234
234
|
/**
|
|
235
235
|
*/
|
|
236
|
-
export const
|
|
236
|
+
export const Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
|
|
237
237
|
|
|
238
238
|
const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
239
239
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1560,7 +1560,7 @@ function __wbg_get_imports() {
|
|
|
1560
1560
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1561
1561
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1562
1562
|
};
|
|
1563
|
-
imports['./snippets/mons-rust-
|
|
1563
|
+
imports['./snippets/mons-rust-cba9eedc04d5b215/inline0.js'] = __wbg_star0;
|
|
1564
1564
|
|
|
1565
1565
|
return imports;
|
|
1566
1566
|
}
|
package/mons-web_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "mons-web",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "super metal mons",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.134",
|
|
6
6
|
"license": "CC0-1.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"mons-web_bg.wasm",
|
|
13
13
|
"mons-web.js",
|
|
14
|
-
"mons-web.d.ts"
|
|
14
|
+
"mons-web.d.ts",
|
|
15
|
+
"snippets"
|
|
15
16
|
],
|
|
16
17
|
"main": "mons-web.js",
|
|
17
18
|
"types": "mons-web.d.ts",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function automove_monotonic_now_ms() { return globalThis.performance.now(); }
|