mons-rust 0.1.127 → 0.1.129
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 +53 -40
- package/mons-rust.js +22 -17
- package/mons-rust_bg.wasm +0 -0
- package/package.json +1 -1
package/mons-rust.d.ts
CHANGED
|
@@ -10,10 +10,11 @@
|
|
|
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 OutputModelKind {
|
|
14
|
+
InvalidInput = 0,
|
|
15
|
+
LocationsToStartFrom = 1,
|
|
16
|
+
NextInputOptions = 2,
|
|
17
|
+
Events = 3,
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
*/
|
|
@@ -41,46 +42,12 @@ export enum EventModelKind {
|
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
44
|
*/
|
|
44
|
-
export enum ItemModelKind {
|
|
45
|
-
Mon = 0,
|
|
46
|
-
Mana = 1,
|
|
47
|
-
MonWithMana = 2,
|
|
48
|
-
MonWithConsumable = 3,
|
|
49
|
-
Consumable = 4,
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
*/
|
|
53
|
-
export enum OutputModelKind {
|
|
54
|
-
InvalidInput = 0,
|
|
55
|
-
LocationsToStartFrom = 1,
|
|
56
|
-
NextInputOptions = 2,
|
|
57
|
-
Events = 3,
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
*/
|
|
61
|
-
export enum SquareModelKind {
|
|
62
|
-
Regular = 0,
|
|
63
|
-
ConsumableBase = 1,
|
|
64
|
-
SupermanaBase = 2,
|
|
65
|
-
ManaBase = 3,
|
|
66
|
-
ManaPool = 4,
|
|
67
|
-
MonBase = 5,
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
*/
|
|
71
45
|
export enum ManaKind {
|
|
72
46
|
Regular = 0,
|
|
73
47
|
Supermana = 1,
|
|
74
48
|
}
|
|
75
49
|
/**
|
|
76
50
|
*/
|
|
77
|
-
export enum Consumable {
|
|
78
|
-
Potion = 0,
|
|
79
|
-
Bomb = 1,
|
|
80
|
-
BombOrPotion = 2,
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
*/
|
|
84
51
|
export enum AvailableMoveKind {
|
|
85
52
|
MonMove = 0,
|
|
86
53
|
ManaMove = 1,
|
|
@@ -89,6 +56,13 @@ export enum AvailableMoveKind {
|
|
|
89
56
|
}
|
|
90
57
|
/**
|
|
91
58
|
*/
|
|
59
|
+
export enum Consumable {
|
|
60
|
+
Potion = 0,
|
|
61
|
+
Bomb = 1,
|
|
62
|
+
BombOrPotion = 2,
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
*/
|
|
92
66
|
export enum Color {
|
|
93
67
|
White = 0,
|
|
94
68
|
Black = 1,
|
|
@@ -108,6 +82,43 @@ export enum NextInputKind {
|
|
|
108
82
|
}
|
|
109
83
|
/**
|
|
110
84
|
*/
|
|
85
|
+
export enum ItemModelKind {
|
|
86
|
+
Mon = 0,
|
|
87
|
+
Mana = 1,
|
|
88
|
+
MonWithMana = 2,
|
|
89
|
+
MonWithConsumable = 3,
|
|
90
|
+
Consumable = 4,
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
*/
|
|
94
|
+
export enum GameVariant {
|
|
95
|
+
Classic = 0,
|
|
96
|
+
SwappedManaRows = 1,
|
|
97
|
+
OffsetArcManaRows = 2,
|
|
98
|
+
CenterSpokeManaRows = 3,
|
|
99
|
+
AlternatingManaRows = 4,
|
|
100
|
+
InnerWedgeManaRows = 5,
|
|
101
|
+
OuterWedgeManaRows = 6,
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
*/
|
|
105
|
+
export enum Modifier {
|
|
106
|
+
SelectPotion = 0,
|
|
107
|
+
SelectBomb = 1,
|
|
108
|
+
Cancel = 2,
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
*/
|
|
112
|
+
export enum SquareModelKind {
|
|
113
|
+
Regular = 0,
|
|
114
|
+
ConsumableBase = 1,
|
|
115
|
+
SupermanaBase = 2,
|
|
116
|
+
ManaBase = 3,
|
|
117
|
+
ManaPool = 4,
|
|
118
|
+
MonBase = 5,
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
*/
|
|
111
122
|
export enum MonKind {
|
|
112
123
|
Demon = 0,
|
|
113
124
|
Drainer = 1,
|
|
@@ -293,9 +304,10 @@ export class MonsGameModel {
|
|
|
293
304
|
*/
|
|
294
305
|
without_last_turn(takeback_fens: (string)[]): MonsGameModel | undefined;
|
|
295
306
|
/**
|
|
307
|
+
* @param {GameVariant} variant
|
|
296
308
|
* @returns {MonsGameModel}
|
|
297
309
|
*/
|
|
298
|
-
static newForSimulation(): MonsGameModel;
|
|
310
|
+
static newForSimulation(variant: GameVariant): MonsGameModel;
|
|
299
311
|
/**
|
|
300
312
|
* @returns {Int32Array}
|
|
301
313
|
*/
|
|
@@ -326,9 +338,10 @@ export class MonsGameModel {
|
|
|
326
338
|
*/
|
|
327
339
|
fen(): string;
|
|
328
340
|
/**
|
|
341
|
+
* @param {GameVariant} variant
|
|
329
342
|
* @returns {MonsGameModel}
|
|
330
343
|
*/
|
|
331
|
-
static new(): MonsGameModel;
|
|
344
|
+
static new(variant: GameVariant): MonsGameModel;
|
|
332
345
|
/**
|
|
333
346
|
* @param {Location} at
|
|
334
347
|
* @returns {ItemModel | undefined}
|
package/mons-rust.js
CHANGED
|
@@ -201,34 +201,37 @@ function handleError(f, args) {
|
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
*/
|
|
204
|
-
module.exports.
|
|
204
|
+
module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
205
205
|
/**
|
|
206
206
|
*/
|
|
207
207
|
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", });
|
|
208
208
|
/**
|
|
209
209
|
*/
|
|
210
|
-
module.exports.
|
|
210
|
+
module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
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.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
|
|
220
220
|
/**
|
|
221
221
|
*/
|
|
222
|
-
module.exports.
|
|
222
|
+
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", });
|
|
223
223
|
/**
|
|
224
224
|
*/
|
|
225
|
-
module.exports.
|
|
225
|
+
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", });
|
|
226
226
|
/**
|
|
227
227
|
*/
|
|
228
|
-
module.exports.
|
|
228
|
+
module.exports.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", });
|
|
229
229
|
/**
|
|
230
230
|
*/
|
|
231
|
-
module.exports.
|
|
231
|
+
module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
|
|
232
|
+
/**
|
|
233
|
+
*/
|
|
234
|
+
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", });
|
|
232
235
|
/**
|
|
233
236
|
*/
|
|
234
237
|
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", });
|
|
@@ -871,10 +874,11 @@ class MonsGameModel {
|
|
|
871
874
|
return ret === 0 ? undefined : MonsGameModel.__wrap(ret);
|
|
872
875
|
}
|
|
873
876
|
/**
|
|
877
|
+
* @param {GameVariant} variant
|
|
874
878
|
* @returns {MonsGameModel}
|
|
875
879
|
*/
|
|
876
|
-
static newForSimulation() {
|
|
877
|
-
const ret = wasm.monsgamemodel_newForSimulation();
|
|
880
|
+
static newForSimulation(variant) {
|
|
881
|
+
const ret = wasm.monsgamemodel_newForSimulation(variant);
|
|
878
882
|
return MonsGameModel.__wrap(ret);
|
|
879
883
|
}
|
|
880
884
|
/**
|
|
@@ -977,10 +981,11 @@ class MonsGameModel {
|
|
|
977
981
|
}
|
|
978
982
|
}
|
|
979
983
|
/**
|
|
984
|
+
* @param {GameVariant} variant
|
|
980
985
|
* @returns {MonsGameModel}
|
|
981
986
|
*/
|
|
982
|
-
static new() {
|
|
983
|
-
const ret = wasm.monsgamemodel_new();
|
|
987
|
+
static new(variant) {
|
|
988
|
+
const ret = wasm.monsgamemodel_new(variant);
|
|
984
989
|
return MonsGameModel.__wrap(ret);
|
|
985
990
|
}
|
|
986
991
|
/**
|
|
@@ -1397,13 +1402,13 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
1397
1402
|
return addHeapObject(ret);
|
|
1398
1403
|
};
|
|
1399
1404
|
|
|
1400
|
-
module.exports.
|
|
1401
|
-
const ret =
|
|
1405
|
+
module.exports.__wbg_eventmodel_new = function(arg0) {
|
|
1406
|
+
const ret = EventModel.__wrap(arg0);
|
|
1402
1407
|
return addHeapObject(ret);
|
|
1403
1408
|
};
|
|
1404
1409
|
|
|
1405
|
-
module.exports.
|
|
1406
|
-
const ret =
|
|
1410
|
+
module.exports.__wbg_location_new = function(arg0) {
|
|
1411
|
+
const ret = Location.__wrap(arg0);
|
|
1407
1412
|
return addHeapObject(ret);
|
|
1408
1413
|
};
|
|
1409
1414
|
|
package/mons-rust_bg.wasm
CHANGED
|
Binary file
|