X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAntiking1.js;h=07dae26cf47c74e74c0a32ebc58d03ada5ad9c13;hb=c3ff3a0c807d97c0311a06491318fe02440266db;hp=ac28c31c5fcbe0fd33ecae5c9bb0cfd5349393b7;hpb=6f2f94374f1e73c375edf732d9425e575e81fff7;p=vchess.git diff --git a/client/src/variants/Antiking1.js b/client/src/variants/Antiking1.js index ac28c31c..07dae26c 100644 --- a/client/src/variants/Antiking1.js +++ b/client/src/variants/Antiking1.js @@ -56,7 +56,7 @@ export class Antiking1Rules extends BerolinaRules { 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; } } @@ -176,7 +176,8 @@ export class Antiking1Rules extends BerolinaRules { return res; } - getCheckSquares(color) { + getCheckSquares() { + const color = this.turn; let res = []; const oppCol = V.GetOppCol(color); if (this.isAttacked(this.kingPos[color], oppCol))