Draft Alice variant, prepare some images
[vchess.git] / public / javascripts / base_rules.js
index 5b0d5d1..e757f7a 100644 (file)
@@ -1019,7 +1019,7 @@ class ChessRules
                {
                        // Pawn move
                        let notation = "";
-                       if (move.vanish.length > 1)
+                       if (move.vanish.length > move.appear.length)
                        {
                                // Capture
                                let startColumn = String.fromCharCode(97 + move.start.y);
@@ -1035,7 +1035,8 @@ class ChessRules
                else
                {
                        // Piece movement
-                       return piece.toUpperCase() + (move.vanish.length > 1 ? "x" : "") + finalSquare;
+                       return piece.toUpperCase() +
+                               (move.vanish.length > move.appear.length ? "x" : "") + finalSquare;
                }
        }