X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FOtage.js;h=2a8891ff6e8c0fa39dac74fbbcc5b00c544cdc8f;hp=9eb900a4d86837ccc05321cbd65c17c322936f68;hb=d982fffc441a0443be90ba6f57a94d1d60b702c8;hpb=259035ec507062fdfc7158ac62b68c722404bfdf diff --git a/client/src/variants/Otage.js b/client/src/variants/Otage.js index 9eb900a4..2a8891ff 100644 --- a/client/src/variants/Otage.js +++ b/client/src/variants/Otage.js @@ -36,7 +36,7 @@ export class OtageRules extends ChessRules { x: ['b', 'k'], y: ['q', 'q'], z: ['q', 'k'], - '_': ['k', 'k'] + '@': ['k', 'k'] }; } @@ -61,7 +61,7 @@ export class OtageRules extends ChessRules { for (let i = 0; i < row.length; i++) { const lowR = row[i].toLowerCase(); const readNext = !(ChessRules.PIECES.includes(lowR)); - if (!!(lowR.match(/[a-z_]/))) { + if (!!(lowR.match(/[a-z@]/))) { sumElts++; if (lowR == 'k') kings[row[i]]++; else if (readNext) { @@ -146,7 +146,7 @@ export class OtageRules extends ChessRules { const c = fenRows[i].charAt(j); const lowR = c.toLowerCase(); const readNext = !(ChessRules.PIECES.includes(lowR)); - if (!!(lowR.match(/[a-z_]/))) { + if (!!(lowR.match(/[a-z@]/))) { if (lowR == 'k') this.kingPos[c == 'k' ? 'b' : 'w'] = [i, k]; else if (readNext) { const up = this.getUnionPieces(fenRows[i][++j], lowR);