X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRococo.js;h=e6480a8cbba5b8bc19bc39a0785e6cf6540c7ffa;hb=e50a802531b99829c533f22ecd21e359e7e1e049;hp=f075fe84f31f7effd5e0dffdd52ca32f9e7fddc8;hpb=93ce6119a67b8510762dd68a07936b6f22f2ad67;p=vchess.git diff --git a/client/src/variants/Rococo.js b/client/src/variants/Rococo.js index f075fe84..e6480a8c 100644 --- a/client/src/variants/Rococo.js +++ b/client/src/variants/Rococo.js @@ -15,6 +15,15 @@ export class RococoRules extends ChessRules { return ChessRules.PIECES.concat([V.IMMOBILIZER]); } + static get Lines() { + return [ + [[1, 1], [1, 9]], + [[1, 9], [9, 9]], + [[9, 9], [9, 1]], + [[9, 1], [1, 1]] + ]; + } + getPpath(b) { if (b[1] == "m") //'m' for Immobilizer (I is too similar to 1) @@ -45,7 +54,7 @@ export class RococoRules extends ChessRules { this.kingPos["w"] = [i, k]; break; default: { - const num = parseInt(position[i].charAt(j)); + const num = parseInt(position[i].charAt(j), 10); if (!isNaN(num)) k += num - 1; } }