projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finalize Shinobi Chess
[vchess.git]
/
client
/
src
/
variants
/
Apocalypse.js
diff --git
a/client/src/variants/Apocalypse.js
b/client/src/variants/Apocalypse.js
index
2439ae5
..
e817296
100644
(file)
--- a/
client/src/variants/Apocalypse.js
+++ b/
client/src/variants/Apocalypse.js
@@
-2,6
+2,7
@@
import { ChessRules } from "@/base_rules";
import { randInt } from "@/utils/alea";
export class ApocalypseRules extends ChessRules {
import { randInt } from "@/utils/alea";
export class ApocalypseRules extends ChessRules {
+
static get PawnSpecs() {
return Object.assign(
{},
static get PawnSpecs() {
return Object.assign(
{},
@@
-55,7
+56,7
@@
export class ApocalypseRules extends ChessRules {
if (['P','p'].includes(row[i])) pawns[row[i]]++;
if (V.PIECES.includes(row[i].toLowerCase())) sumElts++;
else {
if (['P','p'].includes(row[i])) pawns[row[i]]++;
if (V.PIECES.includes(row[i].toLowerCase())) sumElts++;
else {
- const num = parseInt(row[i]);
+ const num = parseInt(row[i]
, 10
);
if (isNaN(num)) return false;
sumElts += num;
}
if (isNaN(num)) return false;
sumElts += num;
}
@@
-139,8
+140,8
@@
export class ApocalypseRules extends ChessRules {
setFlags(fenflags) {
this.penaltyFlags = {
setFlags(fenflags) {
this.penaltyFlags = {
- 'w': parseInt(fenflags[0]),
- 'b': parseInt(fenflags[1])
+ 'w': parseInt(fenflags[0]
, 10
),
+ 'b': parseInt(fenflags[1]
, 10
)
};
}
};
}
@@
-512,4
+513,5
@@
export class ApocalypseRules extends ChessRules {
V.CoordsToSquare(move.end)
);
}
V.CoordsToSquare(move.end)
);
}
+
};
};