feat: pgn parser

This commit is contained in:
2025-05-03 20:46:20 +02:00
parent b2a6b23681
commit b18b53f195
21 changed files with 384 additions and 219 deletions

View File

@@ -1,12 +1,10 @@
1. e4 {1.e4 $1 A fiery start $1} 1... e5 {I like how this game is starting $1} 2. Nc3
Bc5 {J'aime un feu chaud.} 3. Nf3 {It's too cold in here for my liking.} 3...
Qf6 4. Nd5 Qd6 5. d3 c6 {A fiery position is what I seek $1} 6. Nc3 h6 7. a3 Qg6
8. Nxe5 {Things are beginning to heat up, non $2} 8... Qd6 9. Nc4 Qe6 10. d4 Be7
11. Ne3 b5 12. Nf5 d5 13. Nxg7+ {That's not very nice.} 13... Kd7 14. Nxe6
{Brrrrrr. It is getting cold in here.} 14... fxe6 15. exd5 cxd5 16. Bf4 Nf6 17.
Bxb5+ Kd8 18. Qf3 Bd7 19. Be5 {My attack is getting cold, I need to go get some
more firewood $1} 19... a6 20. Bxf6 Re8 21. Bxe7+ Kxe7 22. Nxd5+ exd5 23. Qxd5
Kf8+ {It's getting toasty in here $1} 24. Be2 Bc6 25. Qd6+ Re7 26. Kf1 Ba4 27. b3
1. e4 e5 2. Nc3
Bc5 3. Nf3
Qf6 4. Nd5 Qd6 5. d3 c6 6. Nc3 h6 7. a3 Qg6
8. Nxe5 Qd6 9. Nc4 Qe6 10. d4 Be7
11. Ne3 b5 12. Nf5 d5 13. Nxg7+ Kd7 14. Nxe6
fxe6 15. exd5 cxd5 16. Bf4 Nf6 17.
Bxb5+ Kd8 18. Qf3 Bd7 19. Be5 a6 20. Bxf6 Re8 21. Bxe7+ Kxe7 22. Nxd5+ exd5 23. Qxd5
Kf8+ 24. Be2 Bc6 25. Qd6+ Re7 26. Kf1 Ba4 27. b3
Nc6 28. bxa4 a5 29. Qxc6 Rd8 30. Qxh6+ Kg8 31. Bc4+ Rf7 32. Qg5+ Kh8 33. Bxf7
{C'est très, très mauvais $1} 33... Kh7 34. Qg6+ Kh8 35. Ra2 Rxd4 36. Qg8# {Good
play $1 I'll have to throw another log on the fire and try again.} 1-0
Kh7 34. Qg6+ Kh8 35. Ra2 Rxd4 36. Qg8# 1-0