mons-rust 0.1.91 → 0.1.93
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 +47 -47
- package/mons-rust.js +45 -45
- package/mons-rust_bg.wasm +0 -0
- package/package.json +1 -1
package/mons-rust.d.ts
CHANGED
|
@@ -10,6 +10,48 @@
|
|
|
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
|
+
export enum Modifier {
|
|
24
|
+
SelectPotion = 0,
|
|
25
|
+
SelectBomb = 1,
|
|
26
|
+
Cancel = 2,
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
*/
|
|
30
|
+
export enum Color {
|
|
31
|
+
White = 0,
|
|
32
|
+
Black = 1,
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*/
|
|
36
|
+
export enum NextInputKind {
|
|
37
|
+
MonMove = 0,
|
|
38
|
+
ManaMove = 1,
|
|
39
|
+
MysticAction = 2,
|
|
40
|
+
DemonAction = 3,
|
|
41
|
+
DemonAdditionalStep = 4,
|
|
42
|
+
SpiritTargetCapture = 5,
|
|
43
|
+
SpiritTargetMove = 6,
|
|
44
|
+
SelectConsumable = 7,
|
|
45
|
+
BombAttack = 8,
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
*/
|
|
49
|
+
export enum ManaKind {
|
|
50
|
+
Regular = 0,
|
|
51
|
+
Supermana = 1,
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
*/
|
|
13
55
|
export enum Consumable {
|
|
14
56
|
Potion = 0,
|
|
15
57
|
Bomb = 1,
|
|
@@ -35,16 +77,6 @@ export enum MonKind {
|
|
|
35
77
|
}
|
|
36
78
|
/**
|
|
37
79
|
*/
|
|
38
|
-
export enum SquareModelKind {
|
|
39
|
-
Regular = 0,
|
|
40
|
-
ConsumableBase = 1,
|
|
41
|
-
SupermanaBase = 2,
|
|
42
|
-
ManaBase = 3,
|
|
43
|
-
ManaPool = 4,
|
|
44
|
-
MonBase = 5,
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
*/
|
|
48
80
|
export enum EventModelKind {
|
|
49
81
|
MonMove = 0,
|
|
50
82
|
ManaMove = 1,
|
|
@@ -69,27 +101,6 @@ export enum EventModelKind {
|
|
|
69
101
|
}
|
|
70
102
|
/**
|
|
71
103
|
*/
|
|
72
|
-
export enum OutputModelKind {
|
|
73
|
-
InvalidInput = 0,
|
|
74
|
-
LocationsToStartFrom = 1,
|
|
75
|
-
NextInputOptions = 2,
|
|
76
|
-
Events = 3,
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
*/
|
|
80
|
-
export enum NextInputKind {
|
|
81
|
-
MonMove = 0,
|
|
82
|
-
ManaMove = 1,
|
|
83
|
-
MysticAction = 2,
|
|
84
|
-
DemonAction = 3,
|
|
85
|
-
DemonAdditionalStep = 4,
|
|
86
|
-
SpiritTargetCapture = 5,
|
|
87
|
-
SpiritTargetMove = 6,
|
|
88
|
-
SelectConsumable = 7,
|
|
89
|
-
BombAttack = 8,
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
*/
|
|
93
104
|
export enum AvailableMoveKind {
|
|
94
105
|
MonMove = 0,
|
|
95
106
|
ManaMove = 1,
|
|
@@ -98,22 +109,11 @@ export enum AvailableMoveKind {
|
|
|
98
109
|
}
|
|
99
110
|
/**
|
|
100
111
|
*/
|
|
101
|
-
export enum
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
export enum ManaKind {
|
|
108
|
-
Regular = 0,
|
|
109
|
-
Supermana = 1,
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
*/
|
|
113
|
-
export enum Modifier {
|
|
114
|
-
SelectPotion = 0,
|
|
115
|
-
SelectBomb = 1,
|
|
116
|
-
Cancel = 2,
|
|
112
|
+
export enum OutputModelKind {
|
|
113
|
+
InvalidInput = 0,
|
|
114
|
+
LocationsToStartFrom = 1,
|
|
115
|
+
NextInputOptions = 2,
|
|
116
|
+
Events = 3,
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
*/
|
package/mons-rust.js
CHANGED
|
@@ -7,19 +7,10 @@ const heap = new Array(128).fill(undefined);
|
|
|
7
7
|
|
|
8
8
|
heap.push(undefined, null, true, false);
|
|
9
9
|
|
|
10
|
-
let heap_next = heap.length;
|
|
11
|
-
|
|
12
|
-
function addHeapObject(obj) {
|
|
13
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
14
|
-
const idx = heap_next;
|
|
15
|
-
heap_next = heap[idx];
|
|
16
|
-
|
|
17
|
-
heap[idx] = obj;
|
|
18
|
-
return idx;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
10
|
function getObject(idx) { return heap[idx]; }
|
|
22
11
|
|
|
12
|
+
let heap_next = heap.length;
|
|
13
|
+
|
|
23
14
|
function dropObject(idx) {
|
|
24
15
|
if (idx < 132) return;
|
|
25
16
|
heap[idx] = heap_next;
|
|
@@ -50,6 +41,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
50
41
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
51
42
|
}
|
|
52
43
|
|
|
44
|
+
function addHeapObject(obj) {
|
|
45
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
46
|
+
const idx = heap_next;
|
|
47
|
+
heap_next = heap[idx];
|
|
48
|
+
|
|
49
|
+
heap[idx] = obj;
|
|
50
|
+
return idx;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
53
|
let WASM_VECTOR_LEN = 0;
|
|
54
54
|
|
|
55
55
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -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.
|
|
153
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h08a1876d4c8ab574(arg0, arg1);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
let cachedUint32Memory0 = null;
|
|
@@ -239,37 +239,37 @@ function __wbg_adapter_151(arg0, arg1, arg2, arg3) {
|
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
*/
|
|
242
|
-
module.exports.
|
|
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
243
|
/**
|
|
244
244
|
*/
|
|
245
|
-
module.exports.
|
|
245
|
+
module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
|
|
246
246
|
/**
|
|
247
247
|
*/
|
|
248
|
-
module.exports.
|
|
248
|
+
module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
|
|
249
249
|
/**
|
|
250
250
|
*/
|
|
251
|
-
module.exports.
|
|
251
|
+
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", });
|
|
252
252
|
/**
|
|
253
253
|
*/
|
|
254
|
-
module.exports.
|
|
254
|
+
module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
255
255
|
/**
|
|
256
256
|
*/
|
|
257
|
-
module.exports.
|
|
257
|
+
module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
|
|
258
258
|
/**
|
|
259
259
|
*/
|
|
260
|
-
module.exports.
|
|
260
|
+
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", });
|
|
261
261
|
/**
|
|
262
262
|
*/
|
|
263
|
-
module.exports.
|
|
263
|
+
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", });
|
|
264
264
|
/**
|
|
265
265
|
*/
|
|
266
|
-
module.exports.
|
|
266
|
+
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", });
|
|
267
267
|
/**
|
|
268
268
|
*/
|
|
269
|
-
module.exports.
|
|
269
|
+
module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
|
|
270
270
|
/**
|
|
271
271
|
*/
|
|
272
|
-
module.exports.
|
|
272
|
+
module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
273
273
|
|
|
274
274
|
const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
275
275
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1415,26 +1415,6 @@ class VerboseTrackingEntityModel {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
module.exports.VerboseTrackingEntityModel = VerboseTrackingEntityModel;
|
|
1417
1417
|
|
|
1418
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
|
1419
|
-
const ret = arg0;
|
|
1420
|
-
return addHeapObject(ret);
|
|
1421
|
-
};
|
|
1422
|
-
|
|
1423
|
-
module.exports.__wbg_nextinputmodel_new = function(arg0) {
|
|
1424
|
-
const ret = NextInputModel.__wrap(arg0);
|
|
1425
|
-
return addHeapObject(ret);
|
|
1426
|
-
};
|
|
1427
|
-
|
|
1428
|
-
module.exports.__wbg_eventmodel_new = function(arg0) {
|
|
1429
|
-
const ret = EventModel.__wrap(arg0);
|
|
1430
|
-
return addHeapObject(ret);
|
|
1431
|
-
};
|
|
1432
|
-
|
|
1433
|
-
module.exports.__wbg_location_new = function(arg0) {
|
|
1434
|
-
const ret = Location.__wrap(arg0);
|
|
1435
|
-
return addHeapObject(ret);
|
|
1436
|
-
};
|
|
1437
|
-
|
|
1438
1418
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
1439
1419
|
takeObject(arg0);
|
|
1440
1420
|
};
|
|
@@ -1464,11 +1444,31 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
1464
1444
|
return ret;
|
|
1465
1445
|
};
|
|
1466
1446
|
|
|
1447
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
1448
|
+
const ret = arg0;
|
|
1449
|
+
return addHeapObject(ret);
|
|
1450
|
+
};
|
|
1451
|
+
|
|
1467
1452
|
module.exports.__wbg_outputmodel_new = function(arg0) {
|
|
1468
1453
|
const ret = OutputModel.__wrap(arg0);
|
|
1469
1454
|
return addHeapObject(ret);
|
|
1470
1455
|
};
|
|
1471
1456
|
|
|
1457
|
+
module.exports.__wbg_eventmodel_new = function(arg0) {
|
|
1458
|
+
const ret = EventModel.__wrap(arg0);
|
|
1459
|
+
return addHeapObject(ret);
|
|
1460
|
+
};
|
|
1461
|
+
|
|
1462
|
+
module.exports.__wbg_location_new = function(arg0) {
|
|
1463
|
+
const ret = Location.__wrap(arg0);
|
|
1464
|
+
return addHeapObject(ret);
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1467
|
+
module.exports.__wbg_nextinputmodel_new = function(arg0) {
|
|
1468
|
+
const ret = NextInputModel.__wrap(arg0);
|
|
1469
|
+
return addHeapObject(ret);
|
|
1470
|
+
};
|
|
1471
|
+
|
|
1472
1472
|
module.exports.__wbg_verbosetrackingentitymodel_new = function(arg0) {
|
|
1473
1473
|
const ret = VerboseTrackingEntityModel.__wrap(arg0);
|
|
1474
1474
|
return addHeapObject(ret);
|
|
@@ -1654,8 +1654,8 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
|
1654
1654
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1655
1655
|
};
|
|
1656
1656
|
|
|
1657
|
-
module.exports.
|
|
1658
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1657
|
+
module.exports.__wbindgen_closure_wrapper353 = function(arg0, arg1, arg2) {
|
|
1658
|
+
const ret = makeMutClosure(arg0, arg1, 14, __wbg_adapter_26);
|
|
1659
1659
|
return addHeapObject(ret);
|
|
1660
1660
|
};
|
|
1661
1661
|
|
package/mons-rust_bg.wasm
CHANGED
|
Binary file
|