- notation =
- startColumn +
- "x" +
- finalSquare +
- "=" +
- move.appear[0].p.toUpperCase();
- } //no capture
- else {
- notation = finalSquare;
- if (move.appear.length > 0 && piece != move.appear[0].p)
- //promotion
- notation += "=" + move.appear[0].p.toUpperCase();
- }
- return notation;
+ notation = startColumn + "x" + finalSquare;
+ } else notation = finalSquare;
+ } else {
+ // Piece movement
+ notation =
+ piece.toUpperCase() +
+ (move.vanish.length > 1 ? "x" : "") +
+ finalSquare;