X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FBerolina.js;h=8ea3c9ccffe941e7a49fbfbb653653e4f9ff7021;hb=1b61a94dbd13f6a37a89e62216615d2496c760a2;hp=be72e2d500f2ce7524e3e9758cf9bb036231405d;hpb=5915f72002ae63b04620cebe47adf778174b1bee;p=vchess.git diff --git a/public/javascripts/variants/Berolina.js b/public/javascripts/variants/Berolina.js index be72e2d5..8ea3c9cc 100644 --- a/public/javascripts/variants/Berolina.js +++ b/public/javascripts/variants/Berolina.js @@ -119,14 +119,15 @@ class BerolinaRules extends ChessRules if (piece == V.PAWN) { // Pawn move + const finalSquare = V.CoordsToSquare(move.end); let notation = ""; if (move.vanish.length == 2) //capture - notation = finalSquare; + notation = "Px" + finalSquare; else { - // No capture - const startColumn = V.CoordToColumn(move.start.y); - notation = startColumn + "x" + finalSquare; + // No capture: indicate the initial square for potential ambiguity + const startSquare = V.CoordsToSquare(move.start); + notation = startSquare + finalSquare; } if (move.appear[0].p != V.PAWN) //promotion notation += "=" + move.appear[0].p.toUpperCase();