mons-rust 0.1.57 → 0.1.59
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 +39 -35
- package/mons-rust.js +32 -13
- package/mons-rust_bg.wasm +0 -0
- package/package.json +1 -1
package/mons-rust.d.ts
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
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
|
+
*/
|
|
13
23
|
export enum ItemModelKind {
|
|
14
24
|
Mon = 0,
|
|
15
25
|
Mana = 1,
|
|
@@ -19,12 +29,6 @@ export enum ItemModelKind {
|
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
31
|
*/
|
|
22
|
-
export enum ManaKind {
|
|
23
|
-
Regular = 0,
|
|
24
|
-
Supermana = 1,
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
*/
|
|
28
32
|
export enum EventModelKind {
|
|
29
33
|
MonMove = 0,
|
|
30
34
|
ManaMove = 1,
|
|
@@ -58,6 +62,20 @@ export enum MonKind {
|
|
|
58
62
|
}
|
|
59
63
|
/**
|
|
60
64
|
*/
|
|
65
|
+
export enum Color {
|
|
66
|
+
White = 0,
|
|
67
|
+
Black = 1,
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
*/
|
|
71
|
+
export enum AvailableMoveKind {
|
|
72
|
+
MonMove = 0,
|
|
73
|
+
ManaMove = 1,
|
|
74
|
+
Action = 2,
|
|
75
|
+
Potion = 3,
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
*/
|
|
61
79
|
export enum Modifier {
|
|
62
80
|
SelectPotion = 0,
|
|
63
81
|
SelectBomb = 1,
|
|
@@ -65,6 +83,12 @@ export enum Modifier {
|
|
|
65
83
|
}
|
|
66
84
|
/**
|
|
67
85
|
*/
|
|
86
|
+
export enum ManaKind {
|
|
87
|
+
Regular = 0,
|
|
88
|
+
Supermana = 1,
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
*/
|
|
68
92
|
export enum Consumable {
|
|
69
93
|
Potion = 0,
|
|
70
94
|
Bomb = 1,
|
|
@@ -72,20 +96,6 @@ export enum Consumable {
|
|
|
72
96
|
}
|
|
73
97
|
/**
|
|
74
98
|
*/
|
|
75
|
-
export enum Color {
|
|
76
|
-
White = 0,
|
|
77
|
-
Black = 1,
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
*/
|
|
81
|
-
export enum OutputModelKind {
|
|
82
|
-
InvalidInput = 0,
|
|
83
|
-
LocationsToStartFrom = 1,
|
|
84
|
-
NextInputOptions = 2,
|
|
85
|
-
Events = 3,
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
*/
|
|
89
99
|
export enum NextInputKind {
|
|
90
100
|
MonMove = 0,
|
|
91
101
|
ManaMove = 1,
|
|
@@ -99,21 +109,11 @@ export enum NextInputKind {
|
|
|
99
109
|
}
|
|
100
110
|
/**
|
|
101
111
|
*/
|
|
102
|
-
export enum
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
ManaPool = 4,
|
|
108
|
-
MonBase = 5,
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
*/
|
|
112
|
-
export enum AvailableMoveKind {
|
|
113
|
-
MonMove = 0,
|
|
114
|
-
ManaMove = 1,
|
|
115
|
-
Action = 2,
|
|
116
|
-
Potion = 3,
|
|
112
|
+
export enum OutputModelKind {
|
|
113
|
+
InvalidInput = 0,
|
|
114
|
+
LocationsToStartFrom = 1,
|
|
115
|
+
NextInputOptions = 2,
|
|
116
|
+
Events = 3,
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
*/
|
|
@@ -398,4 +398,8 @@ export class VerboseTrackingEntityModel {
|
|
|
398
398
|
* @returns {(EventModel)[]}
|
|
399
399
|
*/
|
|
400
400
|
events(): (EventModel)[];
|
|
401
|
+
/**
|
|
402
|
+
* @returns {string}
|
|
403
|
+
*/
|
|
404
|
+
events_fen(): string;
|
|
401
405
|
}
|
package/mons-rust.js
CHANGED
|
@@ -201,10 +201,10 @@ function handleError(f, args) {
|
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
*/
|
|
204
|
-
module.exports.
|
|
204
|
+
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", });
|
|
205
205
|
/**
|
|
206
206
|
*/
|
|
207
|
-
module.exports.
|
|
207
|
+
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", });
|
|
208
208
|
/**
|
|
209
209
|
*/
|
|
210
210
|
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", });
|
|
@@ -213,25 +213,25 @@ module.exports.EventModelKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove
|
|
|
213
213
|
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", });
|
|
214
214
|
/**
|
|
215
215
|
*/
|
|
216
|
-
module.exports.
|
|
216
|
+
module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
|
|
217
217
|
/**
|
|
218
218
|
*/
|
|
219
|
-
module.exports.
|
|
219
|
+
module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
|
|
220
220
|
/**
|
|
221
221
|
*/
|
|
222
|
-
module.exports.
|
|
222
|
+
module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
|
|
223
223
|
/**
|
|
224
224
|
*/
|
|
225
|
-
module.exports.
|
|
225
|
+
module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
226
226
|
/**
|
|
227
227
|
*/
|
|
228
|
-
module.exports.
|
|
228
|
+
module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
|
|
229
229
|
/**
|
|
230
230
|
*/
|
|
231
|
-
module.exports.
|
|
231
|
+
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", });
|
|
232
232
|
/**
|
|
233
233
|
*/
|
|
234
|
-
module.exports.
|
|
234
|
+
module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
235
235
|
|
|
236
236
|
const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
237
237
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1298,11 +1298,30 @@ class VerboseTrackingEntityModel {
|
|
|
1298
1298
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
|
+
/**
|
|
1302
|
+
* @returns {string}
|
|
1303
|
+
*/
|
|
1304
|
+
events_fen() {
|
|
1305
|
+
let deferred1_0;
|
|
1306
|
+
let deferred1_1;
|
|
1307
|
+
try {
|
|
1308
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1309
|
+
wasm.verbosetrackingentitymodel_events_fen(retptr, this.__wbg_ptr);
|
|
1310
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1311
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1312
|
+
deferred1_0 = r0;
|
|
1313
|
+
deferred1_1 = r1;
|
|
1314
|
+
return getStringFromWasm0(r0, r1);
|
|
1315
|
+
} finally {
|
|
1316
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1317
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1301
1320
|
}
|
|
1302
1321
|
module.exports.VerboseTrackingEntityModel = VerboseTrackingEntityModel;
|
|
1303
1322
|
|
|
1304
|
-
module.exports.
|
|
1305
|
-
const ret =
|
|
1323
|
+
module.exports.__wbg_eventmodel_new = function(arg0) {
|
|
1324
|
+
const ret = EventModel.__wrap(arg0);
|
|
1306
1325
|
return addHeapObject(ret);
|
|
1307
1326
|
};
|
|
1308
1327
|
|
|
@@ -1311,8 +1330,8 @@ module.exports.__wbg_location_new = function(arg0) {
|
|
|
1311
1330
|
return addHeapObject(ret);
|
|
1312
1331
|
};
|
|
1313
1332
|
|
|
1314
|
-
module.exports.
|
|
1315
|
-
const ret =
|
|
1333
|
+
module.exports.__wbg_nextinputmodel_new = function(arg0) {
|
|
1334
|
+
const ret = NextInputModel.__wrap(arg0);
|
|
1316
1335
|
return addHeapObject(ret);
|
|
1317
1336
|
};
|
|
1318
1337
|
|
package/mons-rust_bg.wasm
CHANGED
|
Binary file
|