mons-rust 0.1.33 → 0.1.35
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 +63 -59
- package/mons-rust.js +22 -15
- package/mons-rust_bg.wasm +0 -0
- package/package.json +1 -1
package/mons-rust.d.ts
CHANGED
|
@@ -10,26 +10,9 @@
|
|
|
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
|
-
ManaScored = 2,
|
|
17
|
-
MysticAction = 3,
|
|
18
|
-
DemonAction = 4,
|
|
19
|
-
DemonAdditionalStep = 5,
|
|
20
|
-
SpiritTargetMove = 6,
|
|
21
|
-
PickupBomb = 7,
|
|
22
|
-
PickupPotion = 8,
|
|
23
|
-
PickupMana = 9,
|
|
24
|
-
MonFainted = 10,
|
|
25
|
-
ManaDropped = 11,
|
|
26
|
-
SupermanaBackToBase = 12,
|
|
27
|
-
BombAttack = 13,
|
|
28
|
-
MonAwake = 14,
|
|
29
|
-
BombExplosion = 15,
|
|
30
|
-
NextTurn = 16,
|
|
31
|
-
GameOver = 17,
|
|
32
|
-
Takeback = 18,
|
|
13
|
+
export enum Color {
|
|
14
|
+
White = 0,
|
|
15
|
+
Black = 1,
|
|
33
16
|
}
|
|
34
17
|
/**
|
|
35
18
|
*/
|
|
@@ -41,34 +24,10 @@ export enum OutputModelKind {
|
|
|
41
24
|
}
|
|
42
25
|
/**
|
|
43
26
|
*/
|
|
44
|
-
export enum
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
ManaBase = 3,
|
|
49
|
-
ManaPool = 4,
|
|
50
|
-
MonBase = 5,
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
*/
|
|
54
|
-
export enum ItemModelKind {
|
|
55
|
-
Mon = 0,
|
|
56
|
-
Mana = 1,
|
|
57
|
-
MonWithMana = 2,
|
|
58
|
-
MonWithConsumable = 3,
|
|
59
|
-
Consumable = 4,
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
*/
|
|
63
|
-
export enum ManaKind {
|
|
64
|
-
Regular = 0,
|
|
65
|
-
Supermana = 1,
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
*/
|
|
69
|
-
export enum Color {
|
|
70
|
-
White = 0,
|
|
71
|
-
Black = 1,
|
|
27
|
+
export enum Consumable {
|
|
28
|
+
Potion = 0,
|
|
29
|
+
Bomb = 1,
|
|
30
|
+
BombOrPotion = 2,
|
|
72
31
|
}
|
|
73
32
|
/**
|
|
74
33
|
*/
|
|
@@ -81,13 +40,6 @@ export enum MonKind {
|
|
|
81
40
|
}
|
|
82
41
|
/**
|
|
83
42
|
*/
|
|
84
|
-
export enum Modifier {
|
|
85
|
-
SelectPotion = 0,
|
|
86
|
-
SelectBomb = 1,
|
|
87
|
-
Cancel = 2,
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
*/
|
|
91
43
|
export enum NextInputKind {
|
|
92
44
|
MonMove = 0,
|
|
93
45
|
ManaMove = 1,
|
|
@@ -101,10 +53,52 @@ export enum NextInputKind {
|
|
|
101
53
|
}
|
|
102
54
|
/**
|
|
103
55
|
*/
|
|
104
|
-
export enum
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
56
|
+
export enum Modifier {
|
|
57
|
+
SelectPotion = 0,
|
|
58
|
+
SelectBomb = 1,
|
|
59
|
+
Cancel = 2,
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
*/
|
|
63
|
+
export enum ItemModelKind {
|
|
64
|
+
Mon = 0,
|
|
65
|
+
Mana = 1,
|
|
66
|
+
MonWithMana = 2,
|
|
67
|
+
MonWithConsumable = 3,
|
|
68
|
+
Consumable = 4,
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
*/
|
|
72
|
+
export enum SquareModelKind {
|
|
73
|
+
Regular = 0,
|
|
74
|
+
ConsumableBase = 1,
|
|
75
|
+
SupermanaBase = 2,
|
|
76
|
+
ManaBase = 3,
|
|
77
|
+
ManaPool = 4,
|
|
78
|
+
MonBase = 5,
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
*/
|
|
82
|
+
export enum EventModelKind {
|
|
83
|
+
MonMove = 0,
|
|
84
|
+
ManaMove = 1,
|
|
85
|
+
ManaScored = 2,
|
|
86
|
+
MysticAction = 3,
|
|
87
|
+
DemonAction = 4,
|
|
88
|
+
DemonAdditionalStep = 5,
|
|
89
|
+
SpiritTargetMove = 6,
|
|
90
|
+
PickupBomb = 7,
|
|
91
|
+
PickupPotion = 8,
|
|
92
|
+
PickupMana = 9,
|
|
93
|
+
MonFainted = 10,
|
|
94
|
+
ManaDropped = 11,
|
|
95
|
+
SupermanaBackToBase = 12,
|
|
96
|
+
BombAttack = 13,
|
|
97
|
+
MonAwake = 14,
|
|
98
|
+
BombExplosion = 15,
|
|
99
|
+
NextTurn = 16,
|
|
100
|
+
GameOver = 17,
|
|
101
|
+
Takeback = 18,
|
|
108
102
|
}
|
|
109
103
|
/**
|
|
110
104
|
*/
|
|
@@ -116,6 +110,12 @@ export enum AvailableMoveKind {
|
|
|
116
110
|
}
|
|
117
111
|
/**
|
|
118
112
|
*/
|
|
113
|
+
export enum ManaKind {
|
|
114
|
+
Regular = 0,
|
|
115
|
+
Supermana = 1,
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
*/
|
|
119
119
|
export class EventModel {
|
|
120
120
|
free(): void;
|
|
121
121
|
/**
|
|
@@ -294,6 +294,10 @@ export class MonsGameModel {
|
|
|
294
294
|
*/
|
|
295
295
|
white_score(): number;
|
|
296
296
|
/**
|
|
297
|
+
* @returns {number}
|
|
298
|
+
*/
|
|
299
|
+
turn_number(): number;
|
|
300
|
+
/**
|
|
297
301
|
* @returns {Int32Array}
|
|
298
302
|
*/
|
|
299
303
|
available_move_kinds(): Int32Array;
|
package/mons-rust.js
CHANGED
|
@@ -194,37 +194,37 @@ module.exports.winner = function(fen_w, fen_b, flat_moves_string_w, flat_moves_s
|
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
*/
|
|
197
|
-
module.exports.
|
|
197
|
+
module.exports.Color = Object.freeze({ White:0,"0":"White",Black:1,"1":"Black", });
|
|
198
198
|
/**
|
|
199
199
|
*/
|
|
200
200
|
module.exports.OutputModelKind = Object.freeze({ InvalidInput:0,"0":"InvalidInput",LocationsToStartFrom:1,"1":"LocationsToStartFrom",NextInputOptions:2,"2":"NextInputOptions",Events:3,"3":"Events", });
|
|
201
201
|
/**
|
|
202
202
|
*/
|
|
203
|
-
module.exports.
|
|
203
|
+
module.exports.Consumable = Object.freeze({ Potion:0,"0":"Potion",Bomb:1,"1":"Bomb",BombOrPotion:2,"2":"BombOrPotion", });
|
|
204
204
|
/**
|
|
205
205
|
*/
|
|
206
|
-
module.exports.
|
|
206
|
+
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", });
|
|
207
207
|
/**
|
|
208
208
|
*/
|
|
209
|
-
module.exports.
|
|
209
|
+
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", });
|
|
210
210
|
/**
|
|
211
211
|
*/
|
|
212
|
-
module.exports.
|
|
212
|
+
module.exports.Modifier = Object.freeze({ SelectPotion:0,"0":"SelectPotion",SelectBomb:1,"1":"SelectBomb",Cancel:2,"2":"Cancel", });
|
|
213
213
|
/**
|
|
214
214
|
*/
|
|
215
|
-
module.exports.
|
|
215
|
+
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", });
|
|
216
216
|
/**
|
|
217
217
|
*/
|
|
218
|
-
module.exports.
|
|
218
|
+
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", });
|
|
219
219
|
/**
|
|
220
220
|
*/
|
|
221
|
-
module.exports.
|
|
221
|
+
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", });
|
|
222
222
|
/**
|
|
223
223
|
*/
|
|
224
|
-
module.exports.
|
|
224
|
+
module.exports.AvailableMoveKind = Object.freeze({ MonMove:0,"0":"MonMove",ManaMove:1,"1":"ManaMove",Action:2,"2":"Action",Potion:3,"3":"Potion", });
|
|
225
225
|
/**
|
|
226
226
|
*/
|
|
227
|
-
module.exports.
|
|
227
|
+
module.exports.ManaKind = Object.freeze({ Regular:0,"0":"Regular",Supermana:1,"1":"Supermana", });
|
|
228
228
|
|
|
229
229
|
const EventModelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
230
230
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -860,6 +860,13 @@ class MonsGameModel {
|
|
|
860
860
|
return ret;
|
|
861
861
|
}
|
|
862
862
|
/**
|
|
863
|
+
* @returns {number}
|
|
864
|
+
*/
|
|
865
|
+
turn_number() {
|
|
866
|
+
const ret = wasm.monsgamemodel_turn_number(this.__wbg_ptr);
|
|
867
|
+
return ret;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
863
870
|
* @returns {Int32Array}
|
|
864
871
|
*/
|
|
865
872
|
available_move_kinds() {
|
|
@@ -1162,11 +1169,6 @@ class SquareModel {
|
|
|
1162
1169
|
}
|
|
1163
1170
|
module.exports.SquareModel = SquareModel;
|
|
1164
1171
|
|
|
1165
|
-
module.exports.__wbg_location_new = function(arg0) {
|
|
1166
|
-
const ret = Location.__wrap(arg0);
|
|
1167
|
-
return addHeapObject(ret);
|
|
1168
|
-
};
|
|
1169
|
-
|
|
1170
1172
|
module.exports.__wbg_nextinputmodel_new = function(arg0) {
|
|
1171
1173
|
const ret = NextInputModel.__wrap(arg0);
|
|
1172
1174
|
return addHeapObject(ret);
|
|
@@ -1177,6 +1179,11 @@ module.exports.__wbg_eventmodel_new = function(arg0) {
|
|
|
1177
1179
|
return addHeapObject(ret);
|
|
1178
1180
|
};
|
|
1179
1181
|
|
|
1182
|
+
module.exports.__wbg_location_new = function(arg0) {
|
|
1183
|
+
const ret = Location.__wrap(arg0);
|
|
1184
|
+
return addHeapObject(ret);
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1180
1187
|
module.exports.__wbg_location_unwrap = function(arg0) {
|
|
1181
1188
|
const ret = Location.__unwrap(takeObject(arg0));
|
|
1182
1189
|
return ret;
|
package/mons-rust_bg.wasm
CHANGED
|
Binary file
|