+ const initialSquare = V.CoordsToSquare(move.start);
+ const finalSquare = V.CoordsToSquare(move.end);
+ let notation = undefined;
+ if (move.appear[0].p == V.PAWN)
+ {
+ // Pawn: generally ambiguous short notation, so we use full description
+ notation = "P" + initialSquare + finalSquare;
+ }
+ else if (move.appear[0].p == V.KING)
+ notation = "K" + (move.vanish.length>1 ? "x" : "") + finalSquare;
+ else
+ notation = move.appear[0].p.toUpperCase() + finalSquare;
+ if (move.vanish.length > 1 && move.appear[0].p != V.KING)
+ notation += "X"; //capture mark (not describing what is captured...)
+ return notation;