X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAntiking2.js;h=762ca5c87e03858c45ce6e242b92dae2a338018d;hb=c3ff3a0c807d97c0311a06491318fe02440266db;hp=2dad5e4912ba1bc68a0009c25281ac3c12173540;hpb=6f2f94374f1e73c375edf732d9425e575e81fff7;p=vchess.git diff --git a/client/src/variants/Antiking2.js b/client/src/variants/Antiking2.js index 2dad5e49..762ca5c8 100644 --- a/client/src/variants/Antiking2.js +++ b/client/src/variants/Antiking2.js @@ -43,7 +43,7 @@ export class Antiking2Rules extends ChessRules { this.antikingPos["w"] = [i, k]; break; default: { - const num = parseInt(rows[i].charAt(j)); + const num = parseInt(rows[i].charAt(j), 10); if (!isNaN(num)) k += num - 1; } } @@ -117,7 +117,8 @@ export class Antiking2Rules extends ChessRules { return res; } - getCheckSquares(color) { + getCheckSquares() { + const color = this.turn; let res = []; const oppCol = V.GetOppCol(color); if (this.isAttacked(this.kingPos[color], oppCol))