{
// 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);
else
{
// Piece movement
- return piece.toUpperCase() + (move.vanish.length > 1 ? "x" : "") + finalSquare;
+ return piece.toUpperCase() +
+ (move.vanish.length > move.appear.length ? "x" : "") + finalSquare;
}
}