X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBerolina.js;h=8473b13ef2e18757105e9a082a24c3c4e824f538;hp=e5a222bb8de5a84a26b898909dc45238cd014602;hb=6e47d367d4b1b4500bc46d65b44c5e55b52221bb;hpb=2c5d7b20742b802d9c47916915c1114bcfc9a9c3 diff --git a/client/src/variants/Berolina.js b/client/src/variants/Berolina.js index e5a222bb..8473b13e 100644 --- a/client/src/variants/Berolina.js +++ b/client/src/variants/Berolina.js @@ -96,10 +96,11 @@ export class BerolinaRules extends ChessRules { this.board[x + shiftX][y] != V.EMPTY && this.canTake([x, y], [x + shiftX, y]) ) { - for (let piece of finalPieces) + for (let piece of finalPieces) { moves.push( this.getBasicMove([x, y], [x + shiftX, y], { c: color, p: piece }) ); + } } // Next condition so that other variants could inherit from this class @@ -150,7 +151,7 @@ export class BerolinaRules extends ChessRules { const finalSquare = V.CoordsToSquare(move.end); let notation = ""; if (move.vanish.length == 2) - //capture + // Capture notation = "Px" + finalSquare; else { // No capture: indicate the initial square for potential ambiguity