X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FSittuyin.js;h=ccdd7b23e9106839f8267f1537b87bb537cb0ce4;hb=6813103a75fecb750f8d0ae77f699ed0cb11178c;hp=004d626bd9470d6229dc8600f2e65c7427e31c30;hpb=8a44494d93d5e4b62bea6ce02931b28f7d1bf260;p=vchess.git diff --git a/client/src/variants/Sittuyin.js b/client/src/variants/Sittuyin.js index 004d626b..ccdd7b23 100644 --- a/client/src/variants/Sittuyin.js +++ b/client/src/variants/Sittuyin.js @@ -311,7 +311,15 @@ export class SittuyinRules extends ChessRules { getNotation(move) { // Do not note placement moves (complete move would be too long) if (move.vanish.length == 0) return ""; + if (move.appear[0].p != move.vanish[0].p) { + // Pawn promotion: indicate correct final square + const initSquare = + V.CoordsToSquare({ x: move.vanish[0].x, y: move.vanish[0].y }) + const destSquare = + V.CoordsToSquare({ x: move.appear[0].x, y: move.appear[0].y }) + const prefix = (initSquare != destSquare ? initSquare : ""); + return prefix + destSquare + "=Q"; + } return super.getNotation(move); } }; -