mons-web 0.1.132 → 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 +21 -42
- package/mons-web.d.ts +81 -81
- package/mons-web.js +95 -95
- package/mons-web_bg.wasm +0 -0
- package/package.json +4 -3
- package/snippets/mons-rust-cba9eedc04d5b215/inline0.js +1 -0
package/README.md
CHANGED
|
@@ -11,32 +11,25 @@ or
|
|
|
11
11
|
Docs:
|
|
12
12
|
|
|
13
13
|
- runbook: `HOW_TO_ITERATE_ON_AUTOMOVE.md`
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- durable rules: `docs/automove-knowledge.md`
|
|
17
|
-
- archive: `docs/automove-archive.md`
|
|
14
|
+
- next mechanism: `AUTOMOVE_IDEAS.md`
|
|
15
|
+
- durable evidence and lessons: `docs/automove-knowledge.md`
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
Shipping surface:
|
|
20
18
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
19
|
+
- Fast and Normal retain shipping search; Pro uses the promoted bounded tactical policy
|
|
20
|
+
- complete independently cold selector calls must remain below `700ms`
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
Experiments use a small candidate-specific `#[cfg(test)]` harness:
|
|
25
23
|
|
|
26
|
-
-
|
|
27
|
-
- `./scripts/run-automove-canonical-loop.sh --confirm frontier_pro_v10_bounded_tactical`
|
|
28
|
-
- `./scripts/run-automove-experiment.sh <stage> frontier_pro_v10_bounded_tactical`
|
|
29
|
-
- `./scripts/run-automove-experiment.sh pro-profile-sweep frontier_pro_v2_raw`
|
|
24
|
+
- `cargo test --release --lib <test_name> -- --ignored --nocapture --test-threads=1`
|
|
30
25
|
- `./scripts/check-automove-hygiene.sh`
|
|
31
|
-
- `./scripts/clean-experiment-artifacts.sh --dry-run`
|
|
32
|
-
- `./scripts/clean-experiment-artifacts.sh --dry-run --all-target`
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
## Real-player complete games
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
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.
|
|
40
33
|
|
|
41
34
|
## Rules Tests
|
|
42
35
|
|
|
@@ -46,29 +39,15 @@ Runner:
|
|
|
46
39
|
- `./scripts/run-rules-tests.sh --limit 100`
|
|
47
40
|
- `./scripts/run-rules-tests.sh --log /tmp/rules-tests.log`
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- `./scripts/pack-rules-tests.sh --dir /tmp/rules-tests-work --chunks-dir ./rules-tests-chunks --chunk-size 100000`
|
|
54
|
-
|
|
55
|
-
## Repo Cleanup
|
|
56
|
-
|
|
57
|
-
- `./repo-clean.sh`
|
|
58
|
-
- `./repo-clean.sh --local-only`
|
|
59
|
-
|
|
60
|
-
Use `keep/<name>` for any branch that should survive repo cleanup.
|
|
42
|
+
The checked-in corpus is `test-data/rules-regressions.jsonl.gz`. Its manifest records
|
|
43
|
+
the deterministic 10,000-case selection policy, source archive hashes, coverage, and
|
|
44
|
+
artifact hashes. The runner verifies the complete stream even when `--limit` executes
|
|
45
|
+
only a prefix.
|
|
61
46
|
|
|
62
47
|
## Publishing
|
|
63
48
|
|
|
64
|
-
- Set the release version in `Cargo.toml` and `Cargo.lock`, then commit the
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
- Run `
|
|
69
|
-
- Run `cargo test --release --lib smart_automove_pro_matches_frontier_bounded_tactical_selector_on_release_fixture`.
|
|
70
|
-
- Run `cargo test --release --lib automove_runtime_black_turn_eight_deadline_tail_probe -- --ignored --nocapture` to enforce the whole-call `700ms` ceiling.
|
|
71
|
-
- Run `./scripts/check-automove-hygiene.sh`.
|
|
72
|
-
- Run `./scripts/assert-release-package-surface.sh pkg/web pkg/node` after the Wasm packages are built.
|
|
73
|
-
- Run `node ./scripts/assert-release-automove-route.cjs pkg/node/mons-rust.js` to verify the generated package routes public Pro through bounded tactical v10 on a fixture that differs from both retained v2 and shipping search.
|
|
74
|
-
- Clean disposable experiment artifacts after validation with `./scripts/clean-experiment-artifacts.sh`.
|
|
49
|
+
- Set the release version in `Cargo.toml` and regenerate `Cargo.lock`, then commit the
|
|
50
|
+
complete release change set. Publishing requires a clean worktree.
|
|
51
|
+
- Run `./publish.sh --check-only` for the complete rules, Rust, release-gate, Wasm,
|
|
52
|
+
public-surface, cold-route, and npm-size validation without publishing.
|
|
53
|
+
- Run `./publish.sh` only after the check-only path passes and the release commit is clean.
|
package/mons-web.d.ts
CHANGED
|
@@ -10,11 +10,28 @@
|
|
|
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
|
-
|
|
17
|
-
|
|
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,
|
|
18
35
|
}
|
|
19
36
|
/**
|
|
20
37
|
*/
|
|
@@ -25,18 +42,11 @@ export enum Modifier {
|
|
|
25
42
|
}
|
|
26
43
|
/**
|
|
27
44
|
*/
|
|
28
|
-
export enum
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
export enum MonKind {
|
|
35
|
-
Demon = 0,
|
|
36
|
-
Drainer = 1,
|
|
37
|
-
Angel = 2,
|
|
38
|
-
Spirit = 3,
|
|
39
|
-
Mystic = 4,
|
|
45
|
+
export enum OutputModelKind {
|
|
46
|
+
InvalidInput = 0,
|
|
47
|
+
LocationsToStartFrom = 1,
|
|
48
|
+
NextInputOptions = 2,
|
|
49
|
+
Events = 3,
|
|
40
50
|
}
|
|
41
51
|
/**
|
|
42
52
|
*/
|
|
@@ -49,35 +59,10 @@ export enum ItemModelKind {
|
|
|
49
59
|
}
|
|
50
60
|
/**
|
|
51
61
|
*/
|
|
52
|
-
export enum
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
MysticAction = 3,
|
|
57
|
-
DemonAction = 4,
|
|
58
|
-
DemonAdditionalStep = 5,
|
|
59
|
-
SpiritTargetMove = 6,
|
|
60
|
-
PickupBomb = 7,
|
|
61
|
-
PickupPotion = 8,
|
|
62
|
-
PickupMana = 9,
|
|
63
|
-
MonFainted = 10,
|
|
64
|
-
ManaDropped = 11,
|
|
65
|
-
SupermanaBackToBase = 12,
|
|
66
|
-
BombAttack = 13,
|
|
67
|
-
MonAwake = 14,
|
|
68
|
-
BombExplosion = 15,
|
|
69
|
-
NextTurn = 16,
|
|
70
|
-
GameOver = 17,
|
|
71
|
-
Takeback = 18,
|
|
72
|
-
UsePotion = 19,
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
*/
|
|
76
|
-
export enum OutputModelKind {
|
|
77
|
-
InvalidInput = 0,
|
|
78
|
-
LocationsToStartFrom = 1,
|
|
79
|
-
NextInputOptions = 2,
|
|
80
|
-
Events = 3,
|
|
62
|
+
export enum Consumable {
|
|
63
|
+
Potion = 0,
|
|
64
|
+
Bomb = 1,
|
|
65
|
+
BombOrPotion = 2,
|
|
81
66
|
}
|
|
82
67
|
/**
|
|
83
68
|
*/
|
|
@@ -91,19 +76,11 @@ export enum SquareModelKind {
|
|
|
91
76
|
}
|
|
92
77
|
/**
|
|
93
78
|
*/
|
|
94
|
-
export enum
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
AlternatingManaRows = 4,
|
|
100
|
-
InnerWedgeManaRows = 5,
|
|
101
|
-
OuterWedgeManaRows = 6,
|
|
102
|
-
BentCenterManaRows = 7,
|
|
103
|
-
OuterEdgeManaRows = 8,
|
|
104
|
-
SplitFlankManaRows = 9,
|
|
105
|
-
ForwardBridgeManaRows = 10,
|
|
106
|
-
CornerChainManaRows = 11,
|
|
79
|
+
export enum AvailableMoveKind {
|
|
80
|
+
MonMove = 0,
|
|
81
|
+
ManaMove = 1,
|
|
82
|
+
Action = 2,
|
|
83
|
+
Potion = 3,
|
|
107
84
|
}
|
|
108
85
|
/**
|
|
109
86
|
*/
|
|
@@ -126,10 +103,33 @@ export enum ManaKind {
|
|
|
126
103
|
}
|
|
127
104
|
/**
|
|
128
105
|
*/
|
|
129
|
-
export enum
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
106
|
+
export enum EventModelKind {
|
|
107
|
+
MonMove = 0,
|
|
108
|
+
ManaMove = 1,
|
|
109
|
+
ManaScored = 2,
|
|
110
|
+
MysticAction = 3,
|
|
111
|
+
DemonAction = 4,
|
|
112
|
+
DemonAdditionalStep = 5,
|
|
113
|
+
SpiritTargetMove = 6,
|
|
114
|
+
PickupBomb = 7,
|
|
115
|
+
PickupPotion = 8,
|
|
116
|
+
PickupMana = 9,
|
|
117
|
+
MonFainted = 10,
|
|
118
|
+
ManaDropped = 11,
|
|
119
|
+
SupermanaBackToBase = 12,
|
|
120
|
+
BombAttack = 13,
|
|
121
|
+
MonAwake = 14,
|
|
122
|
+
BombExplosion = 15,
|
|
123
|
+
NextTurn = 16,
|
|
124
|
+
GameOver = 17,
|
|
125
|
+
Takeback = 18,
|
|
126
|
+
UsePotion = 19,
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
*/
|
|
130
|
+
export enum Color {
|
|
131
|
+
White = 0,
|
|
132
|
+
Black = 1,
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
*/
|
|
@@ -464,8 +464,12 @@ export interface InitOutput {
|
|
|
464
464
|
readonly __wbg_get_itemmodel_kind: (a: number) => number;
|
|
465
465
|
readonly __wbg_get_itemmodel_mana: (a: number) => number;
|
|
466
466
|
readonly __wbg_get_itemmodel_mon: (a: number) => number;
|
|
467
|
+
readonly __wbg_get_location_i: (a: number) => number;
|
|
468
|
+
readonly __wbg_get_location_j: (a: number) => number;
|
|
467
469
|
readonly __wbg_get_manamodel_color: (a: number) => number;
|
|
468
470
|
readonly __wbg_get_manamodel_kind: (a: number) => number;
|
|
471
|
+
readonly __wbg_get_mon_color: (a: number) => number;
|
|
472
|
+
readonly __wbg_get_mon_kind: (a: number) => number;
|
|
469
473
|
readonly __wbg_get_nextinputmodel_actor_mon_item: (a: number) => number;
|
|
470
474
|
readonly __wbg_get_nextinputmodel_kind: (a: number) => number;
|
|
471
475
|
readonly __wbg_get_nextinputmodel_modifier: (a: number) => number;
|
|
@@ -474,7 +478,9 @@ export interface InitOutput {
|
|
|
474
478
|
readonly __wbg_get_squaremodel_kind: (a: number) => number;
|
|
475
479
|
readonly __wbg_get_squaremodel_mon_kind: (a: number) => number;
|
|
476
480
|
readonly __wbg_itemmodel_free: (a: number) => void;
|
|
481
|
+
readonly __wbg_location_free: (a: number) => void;
|
|
477
482
|
readonly __wbg_manamodel_free: (a: number) => void;
|
|
483
|
+
readonly __wbg_mon_free: (a: number) => void;
|
|
478
484
|
readonly __wbg_monsgamemodel_free: (a: number) => void;
|
|
479
485
|
readonly __wbg_nextinputmodel_free: (a: number) => void;
|
|
480
486
|
readonly __wbg_outputmodel_free: (a: number) => void;
|
|
@@ -489,8 +495,12 @@ export interface InitOutput {
|
|
|
489
495
|
readonly __wbg_set_itemmodel_kind: (a: number, b: number) => void;
|
|
490
496
|
readonly __wbg_set_itemmodel_mana: (a: number, b: number) => void;
|
|
491
497
|
readonly __wbg_set_itemmodel_mon: (a: number, b: number) => void;
|
|
498
|
+
readonly __wbg_set_location_i: (a: number, b: number) => void;
|
|
499
|
+
readonly __wbg_set_location_j: (a: number, b: number) => void;
|
|
492
500
|
readonly __wbg_set_manamodel_color: (a: number, b: number) => void;
|
|
493
501
|
readonly __wbg_set_manamodel_kind: (a: number, b: number) => void;
|
|
502
|
+
readonly __wbg_set_mon_color: (a: number, b: number) => void;
|
|
503
|
+
readonly __wbg_set_mon_kind: (a: number, b: number) => void;
|
|
494
504
|
readonly __wbg_set_nextinputmodel_actor_mon_item: (a: number, b: number) => void;
|
|
495
505
|
readonly __wbg_set_nextinputmodel_kind: (a: number, b: number) => void;
|
|
496
506
|
readonly __wbg_set_nextinputmodel_modifier: (a: number, b: number) => void;
|
|
@@ -498,7 +508,13 @@ export interface InitOutput {
|
|
|
498
508
|
readonly __wbg_set_squaremodel_color: (a: number, b: number) => void;
|
|
499
509
|
readonly __wbg_set_squaremodel_kind: (a: number, b: number) => void;
|
|
500
510
|
readonly __wbg_set_squaremodel_mon_kind: (a: number, b: number) => void;
|
|
511
|
+
readonly __wbg_squaremodel_free: (a: number) => void;
|
|
501
512
|
readonly __wbg_verbosetrackingentitymodel_free: (a: number) => void;
|
|
513
|
+
readonly location_new: (a: number, b: number) => number;
|
|
514
|
+
readonly mon_decrease_cooldown: (a: number) => void;
|
|
515
|
+
readonly mon_faint: (a: number) => void;
|
|
516
|
+
readonly mon_is_fainted: (a: number) => number;
|
|
517
|
+
readonly mon_new: (a: number, b: number, c: number) => number;
|
|
502
518
|
readonly monsgamemodel_active_color: (a: number) => number;
|
|
503
519
|
readonly monsgamemodel_automove: (a: number) => number;
|
|
504
520
|
readonly monsgamemodel_available_move_kinds: (a: number, b: number) => void;
|
|
@@ -537,27 +553,11 @@ export interface InitOutput {
|
|
|
537
553
|
readonly verbosetrackingentitymodel_events: (a: number, b: number) => void;
|
|
538
554
|
readonly verbosetrackingentitymodel_events_fen: (a: number, b: number) => void;
|
|
539
555
|
readonly verbosetrackingentitymodel_fen: (a: number, b: number) => void;
|
|
556
|
+
readonly winner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
540
557
|
readonly __wbg_set_nextinputmodel_location: (a: number, b: number) => void;
|
|
541
|
-
readonly __wbg_get_nextinputmodel_location: (a: number) => number;
|
|
542
|
-
readonly __wbg_squaremodel_free: (a: number) => void;
|
|
543
|
-
readonly __wbg_get_location_i: (a: number) => number;
|
|
544
|
-
readonly __wbg_get_location_j: (a: number) => number;
|
|
545
|
-
readonly __wbg_get_mon_color: (a: number) => number;
|
|
546
|
-
readonly __wbg_get_mon_kind: (a: number) => number;
|
|
547
|
-
readonly __wbg_location_free: (a: number) => void;
|
|
548
|
-
readonly __wbg_mon_free: (a: number) => void;
|
|
549
|
-
readonly __wbg_set_location_i: (a: number, b: number) => void;
|
|
550
|
-
readonly __wbg_set_location_j: (a: number, b: number) => void;
|
|
551
|
-
readonly __wbg_set_mon_color: (a: number, b: number) => void;
|
|
552
|
-
readonly __wbg_set_mon_kind: (a: number, b: number) => void;
|
|
553
|
-
readonly mon_decrease_cooldown: (a: number) => void;
|
|
554
|
-
readonly mon_faint: (a: number) => void;
|
|
555
|
-
readonly mon_is_fainted: (a: number) => number;
|
|
556
|
-
readonly mon_new: (a: number, b: number, c: number) => number;
|
|
557
|
-
readonly location_new: (a: number, b: number) => number;
|
|
558
558
|
readonly __wbg_set_mon_cooldown: (a: number, b: number) => void;
|
|
559
559
|
readonly __wbg_get_mon_cooldown: (a: number) => number;
|
|
560
|
-
readonly
|
|
560
|
+
readonly __wbg_get_nextinputmodel_location: (a: number) => number;
|
|
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
|
|
|
@@ -117,6 +117,37 @@ function getInt32Memory0() {
|
|
|
117
117
|
}
|
|
118
118
|
return cachedInt32Memory0;
|
|
119
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* @param {string} fen_w
|
|
122
|
+
* @param {string} fen_b
|
|
123
|
+
* @param {string} flat_moves_string_w
|
|
124
|
+
* @param {string} flat_moves_string_b
|
|
125
|
+
* @returns {string}
|
|
126
|
+
*/
|
|
127
|
+
export function winner(fen_w, fen_b, flat_moves_string_w, flat_moves_string_b) {
|
|
128
|
+
let deferred5_0;
|
|
129
|
+
let deferred5_1;
|
|
130
|
+
try {
|
|
131
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
132
|
+
const ptr0 = passStringToWasm0(fen_w, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
133
|
+
const len0 = WASM_VECTOR_LEN;
|
|
134
|
+
const ptr1 = passStringToWasm0(fen_b, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
135
|
+
const len1 = WASM_VECTOR_LEN;
|
|
136
|
+
const ptr2 = passStringToWasm0(flat_moves_string_w, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
137
|
+
const len2 = WASM_VECTOR_LEN;
|
|
138
|
+
const ptr3 = passStringToWasm0(flat_moves_string_b, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
139
|
+
const len3 = WASM_VECTOR_LEN;
|
|
140
|
+
wasm.winner(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
141
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
142
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
143
|
+
deferred5_0 = r0;
|
|
144
|
+
deferred5_1 = r1;
|
|
145
|
+
return getStringFromWasm0(r0, r1);
|
|
146
|
+
} finally {
|
|
147
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
148
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
120
151
|
|
|
121
152
|
let cachedUint32Memory0 = null;
|
|
122
153
|
|
|
@@ -159,37 +190,6 @@ function getArrayI32FromWasm0(ptr, len) {
|
|
|
159
190
|
ptr = ptr >>> 0;
|
|
160
191
|
return getInt32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
161
192
|
}
|
|
162
|
-
/**
|
|
163
|
-
* @param {string} fen_w
|
|
164
|
-
* @param {string} fen_b
|
|
165
|
-
* @param {string} flat_moves_string_w
|
|
166
|
-
* @param {string} flat_moves_string_b
|
|
167
|
-
* @returns {string}
|
|
168
|
-
*/
|
|
169
|
-
export function winner(fen_w, fen_b, flat_moves_string_w, flat_moves_string_b) {
|
|
170
|
-
let deferred5_0;
|
|
171
|
-
let deferred5_1;
|
|
172
|
-
try {
|
|
173
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
174
|
-
const ptr0 = passStringToWasm0(fen_w, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
175
|
-
const len0 = WASM_VECTOR_LEN;
|
|
176
|
-
const ptr1 = passStringToWasm0(fen_b, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
177
|
-
const len1 = WASM_VECTOR_LEN;
|
|
178
|
-
const ptr2 = passStringToWasm0(flat_moves_string_w, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
179
|
-
const len2 = WASM_VECTOR_LEN;
|
|
180
|
-
const ptr3 = passStringToWasm0(flat_moves_string_b, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
181
|
-
const len3 = WASM_VECTOR_LEN;
|
|
182
|
-
wasm.winner(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
183
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
184
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
185
|
-
deferred5_0 = r0;
|
|
186
|
-
deferred5_1 = r1;
|
|
187
|
-
return getStringFromWasm0(r0, r1);
|
|
188
|
-
} finally {
|
|
189
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
190
|
-
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
193
|
|
|
194
194
|
function handleError(f, args) {
|
|
195
195
|
try {
|
|
@@ -200,31 +200,28 @@ 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
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
|
|
219
|
-
/**
|
|
220
|
-
*/
|
|
221
|
-
export const OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
218
|
+
export const Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
|
|
222
219
|
/**
|
|
223
220
|
*/
|
|
224
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", });
|
|
225
222
|
/**
|
|
226
223
|
*/
|
|
227
|
-
export const
|
|
224
|
+
export const AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
|
|
228
225
|
/**
|
|
229
226
|
*/
|
|
230
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", });
|
|
@@ -233,7 +230,10 @@ export const NextInputKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,
|
|
|
233
230
|
export const ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
234
231
|
/**
|
|
235
232
|
*/
|
|
236
|
-
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
|
+
/**
|
|
235
|
+
*/
|
|
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: () => {} }
|
|
@@ -1416,35 +1416,31 @@ async function __wbg_load(module, imports) {
|
|
|
1416
1416
|
function __wbg_get_imports() {
|
|
1417
1417
|
const imports = {};
|
|
1418
1418
|
imports.wbg = {};
|
|
1419
|
+
imports.wbg.__wbg_location_unwrap = function(arg0) {
|
|
1420
|
+
const ret = Location.__unwrap(takeObject(arg0));
|
|
1421
|
+
return ret;
|
|
1422
|
+
};
|
|
1419
1423
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1420
1424
|
takeObject(arg0);
|
|
1421
1425
|
};
|
|
1422
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1423
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1424
|
-
return addHeapObject(ret);
|
|
1425
|
-
};
|
|
1426
1426
|
imports.wbg.__wbg_eventmodel_new = function(arg0) {
|
|
1427
1427
|
const ret = EventModel.__wrap(arg0);
|
|
1428
1428
|
return addHeapObject(ret);
|
|
1429
1429
|
};
|
|
1430
|
-
imports.wbg.__wbg_location_new = function(arg0) {
|
|
1431
|
-
const ret = Location.__wrap(arg0);
|
|
1432
|
-
return addHeapObject(ret);
|
|
1433
|
-
};
|
|
1434
1430
|
imports.wbg.__wbg_nextinputmodel_new = function(arg0) {
|
|
1435
1431
|
const ret = NextInputModel.__wrap(arg0);
|
|
1436
1432
|
return addHeapObject(ret);
|
|
1437
1433
|
};
|
|
1434
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1435
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1436
|
+
return addHeapObject(ret);
|
|
1437
|
+
};
|
|
1438
1438
|
imports.wbg.__wbg_verbosetrackingentitymodel_new = function(arg0) {
|
|
1439
1439
|
const ret = VerboseTrackingEntityModel.__wrap(arg0);
|
|
1440
1440
|
return addHeapObject(ret);
|
|
1441
1441
|
};
|
|
1442
|
-
imports.wbg.
|
|
1443
|
-
const ret = Location.
|
|
1444
|
-
return ret;
|
|
1445
|
-
};
|
|
1446
|
-
imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
|
|
1447
|
-
const ret = getObject(arg0).crypto;
|
|
1442
|
+
imports.wbg.__wbg_location_new = function(arg0) {
|
|
1443
|
+
const ret = Location.__wrap(arg0);
|
|
1448
1444
|
return addHeapObject(ret);
|
|
1449
1445
|
};
|
|
1450
1446
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
@@ -1452,6 +1448,10 @@ function __wbg_get_imports() {
|
|
|
1452
1448
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1453
1449
|
return ret;
|
|
1454
1450
|
};
|
|
1451
|
+
imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
|
|
1452
|
+
const ret = getObject(arg0).crypto;
|
|
1453
|
+
return addHeapObject(ret);
|
|
1454
|
+
};
|
|
1455
1455
|
imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {
|
|
1456
1456
|
const ret = getObject(arg0).process;
|
|
1457
1457
|
return addHeapObject(ret);
|
|
@@ -1472,36 +1472,52 @@ function __wbg_get_imports() {
|
|
|
1472
1472
|
const ret = module.require;
|
|
1473
1473
|
return addHeapObject(ret);
|
|
1474
1474
|
}, arguments) };
|
|
1475
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
1476
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
1477
|
-
return ret;
|
|
1478
|
-
};
|
|
1479
1475
|
imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
|
|
1480
1476
|
const ret = getObject(arg0).msCrypto;
|
|
1481
1477
|
return addHeapObject(ret);
|
|
1482
1478
|
};
|
|
1479
|
+
imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {
|
|
1480
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1481
|
+
}, arguments) };
|
|
1483
1482
|
imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {
|
|
1484
1483
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1485
1484
|
}, arguments) };
|
|
1486
|
-
imports.wbg.
|
|
1487
|
-
getObject(arg0)
|
|
1485
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
1486
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
1487
|
+
return ret;
|
|
1488
|
+
};
|
|
1489
|
+
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
1490
|
+
const ret = self.self;
|
|
1491
|
+
return addHeapObject(ret);
|
|
1488
1492
|
}, arguments) };
|
|
1493
|
+
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
|
|
1494
|
+
const ret = window.window;
|
|
1495
|
+
return addHeapObject(ret);
|
|
1496
|
+
}, arguments) };
|
|
1497
|
+
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
|
|
1498
|
+
const ret = globalThis.globalThis;
|
|
1499
|
+
return addHeapObject(ret);
|
|
1500
|
+
}, arguments) };
|
|
1501
|
+
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
|
|
1502
|
+
const ret = global.global;
|
|
1503
|
+
return addHeapObject(ret);
|
|
1504
|
+
}, arguments) };
|
|
1505
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1506
|
+
const ret = getObject(arg0) === undefined;
|
|
1507
|
+
return ret;
|
|
1508
|
+
};
|
|
1489
1509
|
imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
|
|
1490
1510
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1491
1511
|
return addHeapObject(ret);
|
|
1492
1512
|
};
|
|
1513
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
1514
|
+
const ret = getObject(arg0);
|
|
1515
|
+
return addHeapObject(ret);
|
|
1516
|
+
};
|
|
1493
1517
|
imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
|
|
1494
1518
|
const ret = new Uint8Array(getObject(arg0));
|
|
1495
1519
|
return addHeapObject(ret);
|
|
1496
1520
|
};
|
|
1497
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1498
|
-
const obj = getObject(arg1);
|
|
1499
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1500
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1501
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1502
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1503
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1504
|
-
};
|
|
1505
1521
|
imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
|
|
1506
1522
|
const ret = getObject(arg0).buffer;
|
|
1507
1523
|
return addHeapObject(ret);
|
|
@@ -1521,38 +1537,22 @@ function __wbg_get_imports() {
|
|
|
1521
1537
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1522
1538
|
return addHeapObject(ret);
|
|
1523
1539
|
};
|
|
1524
|
-
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
|
|
1525
|
-
const ret = self.self;
|
|
1526
|
-
return addHeapObject(ret);
|
|
1527
|
-
}, arguments) };
|
|
1528
|
-
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
|
|
1529
|
-
const ret = window.window;
|
|
1530
|
-
return addHeapObject(ret);
|
|
1531
|
-
}, arguments) };
|
|
1532
|
-
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
|
|
1533
|
-
const ret = globalThis.globalThis;
|
|
1534
|
-
return addHeapObject(ret);
|
|
1535
|
-
}, arguments) };
|
|
1536
|
-
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
|
|
1537
|
-
const ret = global.global;
|
|
1538
|
-
return addHeapObject(ret);
|
|
1539
|
-
}, arguments) };
|
|
1540
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1541
|
-
const ret = getObject(arg0) === undefined;
|
|
1542
|
-
return ret;
|
|
1543
|
-
};
|
|
1544
1540
|
imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
|
|
1545
1541
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1546
1542
|
return addHeapObject(ret);
|
|
1547
1543
|
}, arguments) };
|
|
1548
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
1549
|
-
const ret = getObject(arg0);
|
|
1550
|
-
return addHeapObject(ret);
|
|
1551
|
-
};
|
|
1552
1544
|
imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1553
1545
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1554
1546
|
return addHeapObject(ret);
|
|
1555
1547
|
}, arguments) };
|
|
1548
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1549
|
+
const obj = getObject(arg1);
|
|
1550
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1551
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1552
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1553
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1554
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1555
|
+
};
|
|
1556
1556
|
imports.wbg.__wbindgen_memory = function() {
|
|
1557
1557
|
const ret = wasm.memory;
|
|
1558
1558
|
return addHeapObject(ret);
|
|
@@ -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,11 +11,12 @@
|
|
|
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",
|
|
18
19
|
"sideEffects": [
|
|
19
20
|
"./snippets/*"
|
|
20
21
|
]
|
|
21
|
-
}
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function automove_monotonic_now_ms() { return globalThis.performance.now(); }
|