// Piece or pawn movement
let notation = piece.toUpperCase() + pawnMark + captureMark + finalSquare;
- if (["s", "p"].includes(piece) && !["s", "p"].includes(move.appear[0].p)) {
+ if (["s", "p"].includes(piece) && !["s", "p"].includes(move.appear[0].p))
// Promotion
notation += "=" + move.appear[0].p.toUpperCase();
- }
return notation;
}
};