mons-rust 0.1.60 → 0.1.61
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 +43 -39
- package/mons-rust.js +30 -14
- package/mons-rust_bg.wasm +0 -0
- package/package.json +1 -1
package/mons-rust.d.ts
CHANGED
|
@@ -10,11 +10,21 @@
|
|
|
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 ItemModelKind {
|
|
14
|
+
Mon = 0,
|
|
15
|
+
Mana = 1,
|
|
16
|
+
MonWithMana = 2,
|
|
17
|
+
MonWithConsumable = 3,
|
|
18
|
+
Consumable = 4,
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*/
|
|
22
|
+
export enum MonKind {
|
|
23
|
+
Demon = 0,
|
|
24
|
+
Drainer = 1,
|
|
25
|
+
Angel = 2,
|
|
26
|
+
Spirit = 3,
|
|
27
|
+
Mystic = 4,
|
|
18
28
|
}
|
|
19
29
|
/**
|
|
20
30
|
*/
|
|
@@ -31,19 +41,18 @@ export enum NextInputKind {
|
|
|
31
41
|
}
|
|
32
42
|
/**
|
|
33
43
|
*/
|
|
34
|
-
export enum
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Consumable = 4,
|
|
44
|
+
export enum AvailableMoveKind {
|
|
45
|
+
MonMove = 0,
|
|
46
|
+
ManaMove = 1,
|
|
47
|
+
Action = 2,
|
|
48
|
+
Potion = 3,
|
|
40
49
|
}
|
|
41
50
|
/**
|
|
42
51
|
*/
|
|
43
|
-
export enum
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
export enum Consumable {
|
|
53
|
+
Potion = 0,
|
|
54
|
+
Bomb = 1,
|
|
55
|
+
BombOrPotion = 2,
|
|
47
56
|
}
|
|
48
57
|
/**
|
|
49
58
|
*/
|
|
@@ -57,17 +66,10 @@ export enum SquareModelKind {
|
|
|
57
66
|
}
|
|
58
67
|
/**
|
|
59
68
|
*/
|
|
60
|
-
export enum
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
*/
|
|
66
|
-
export enum AvailableMoveKind {
|
|
67
|
-
MonMove = 0,
|
|
68
|
-
ManaMove = 1,
|
|
69
|
-
Action = 2,
|
|
70
|
-
Potion = 3,
|
|
69
|
+
export enum Modifier {
|
|
70
|
+
SelectPotion = 0,
|
|
71
|
+
SelectBomb = 1,
|
|
72
|
+
Cancel = 2,
|
|
71
73
|
}
|
|
72
74
|
/**
|
|
73
75
|
*/
|
|
@@ -95,25 +97,23 @@ export enum EventModelKind {
|
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
99
|
*/
|
|
98
|
-
export enum Consumable {
|
|
99
|
-
Potion = 0,
|
|
100
|
-
Bomb = 1,
|
|
101
|
-
BombOrPotion = 2,
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
*/
|
|
105
100
|
export enum ManaKind {
|
|
106
101
|
Regular = 0,
|
|
107
102
|
Supermana = 1,
|
|
108
103
|
}
|
|
109
104
|
/**
|
|
110
105
|
*/
|
|
111
|
-
export enum
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
export enum OutputModelKind {
|
|
107
|
+
InvalidInput = 0,
|
|
108
|
+
LocationsToStartFrom = 1,
|
|
109
|
+
NextInputOptions = 2,
|
|
110
|
+
Events = 3,
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
*/
|
|
114
|
+
export enum Color {
|
|
115
|
+
White = 0,
|
|
116
|
+
Black = 1,
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
*/
|
|
@@ -319,6 +319,10 @@ export class MonsGameModel {
|
|
|
319
319
|
*/
|
|
320
320
|
inactive_player_items_counters(): Int32Array;
|
|
321
321
|
/**
|
|
322
|
+
* @returns {(string)[]}
|
|
323
|
+
*/
|
|
324
|
+
takeback_fens(): (string)[];
|
|
325
|
+
/**
|
|
322
326
|
* @returns {Int32Array}
|
|
323
327
|
*/
|
|
324
328
|
available_move_kinds(): Int32Array;
|
package/mons-rust.js
CHANGED
|
@@ -201,37 +201,37 @@ function handleError(f, args) {
|
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
*/
|
|
204
|
-
module.exports.
|
|
204
|
+
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", });
|
|
205
205
|
/**
|
|
206
206
|
*/
|
|
207
|
-
module.exports.
|
|
207
|
+
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", });
|
|
208
208
|
/**
|
|
209
209
|
*/
|
|
210
|
-
module.exports.
|
|
210
|
+
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", });
|
|
211
211
|
/**
|
|
212
212
|
*/
|
|
213
|
-
module.exports.
|
|
213
|
+
module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
|
|
214
214
|
/**
|
|
215
215
|
*/
|
|
216
|
-
module.exports.
|
|
216
|
+
module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
|
|
217
217
|
/**
|
|
218
218
|
*/
|
|
219
|
-
module.exports.
|
|
219
|
+
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", });
|
|
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
225
|
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", });
|
|
226
226
|
/**
|
|
227
227
|
*/
|
|
228
|
-
module.exports.
|
|
228
|
+
module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
229
229
|
/**
|
|
230
230
|
*/
|
|
231
|
-
module.exports.
|
|
231
|
+
module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
232
232
|
/**
|
|
233
233
|
*/
|
|
234
|
-
module.exports.
|
|
234
|
+
module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
|
|
235
235
|
|
|
236
236
|
const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
237
237
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -919,6 +919,22 @@ class MonsGameModel {
|
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
921
|
/**
|
|
922
|
+
* @returns {(string)[]}
|
|
923
|
+
*/
|
|
924
|
+
takeback_fens() {
|
|
925
|
+
try {
|
|
926
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
927
|
+
wasm.monsgamemodel_takeback_fens(retptr, this.__wbg_ptr);
|
|
928
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
929
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
930
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
931
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
932
|
+
return v1;
|
|
933
|
+
} finally {
|
|
934
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
922
938
|
* @returns {Int32Array}
|
|
923
939
|
*/
|
|
924
940
|
available_move_kinds() {
|
|
@@ -1325,13 +1341,13 @@ module.exports.__wbg_location_new = function(arg0) {
|
|
|
1325
1341
|
return addHeapObject(ret);
|
|
1326
1342
|
};
|
|
1327
1343
|
|
|
1328
|
-
module.exports.
|
|
1329
|
-
const ret =
|
|
1344
|
+
module.exports.__wbg_eventmodel_new = function(arg0) {
|
|
1345
|
+
const ret = EventModel.__wrap(arg0);
|
|
1330
1346
|
return addHeapObject(ret);
|
|
1331
1347
|
};
|
|
1332
1348
|
|
|
1333
|
-
module.exports.
|
|
1334
|
-
const ret =
|
|
1349
|
+
module.exports.__wbg_nextinputmodel_new = function(arg0) {
|
|
1350
|
+
const ret = NextInputModel.__wrap(arg0);
|
|
1335
1351
|
return addHeapObject(ret);
|
|
1336
1352
|
};
|
|
1337
1353
|
|
package/mons-rust_bg.wasm
CHANGED
|
Binary file
|