- pgn += getFullNotation(this.moves[i], "unambiguous") + "\n";
- if (i+1 < this.moves.length)
- pgn += getFullNotation(this.moves[i+1], "unambiguous") + "\n";
+ const moveNumber = i / 2 + 1;
+ pgn += moveNumber + "." + i + " " +
+ getFullNotation(this.moves[i], "unambiguous") + "\n";
+ if (i+1 < this.moves.length) {
+ pgn += moveNumber + "." + (i+1) + " " +
+ getFullNotation(this.moves[i+1], "unambiguous") + "\n";
+ }