Add PGN export and a Copy PGN button for finished games

- Record moves in standard algebraic notation (GameState.SanHistory), built at
  move time in ChessService (captures, disambiguation, castling, promotion,
  en passant, and the check/mate suffix)
- Add PgnExporter.ToPgn (seven-tag header + movetext + result) and a
  GET /api/chess/{gameId}/pgn endpoint
- Show a Copy PGN button when a game ends on both the play and watch pages,
  prefetching the PGN so it works during the post-game cleanup window

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Josh-Heaps
2026-06-08 19:14:39 -06:00
co-authored by Claude Opus 4.8
parent d87cea572f
commit b651683e63
11 changed files with 255 additions and 0 deletions
+11
View File
@@ -28,6 +28,17 @@
margin: 2vh;
}
#copyPgnBtn {
background-color: #8cd5ed;
color: #262626;
border-radius: 30px;
border: 0px;
cursor: pointer;
order: 1;
padding: 2vh;
margin: 2vh;
}
#watchLink {
color: #8cd5ed;
text-decoration: none;