Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing pgn loading #35

Merged
merged 4 commits into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChessPositions/puzzle1_whitetomove.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"white_pawn": ["b7", "h5", "g2"], "white_bishop": [], "white_knight": [], "white_rook": ["a7"], "white_queen": [], "white_king": ["e1"], "black_pawn": ["e4", "f4", "g7", "h6"], "black_bishop": [], "black_knight": [], "black_rook": ["b4"], "black_queen": [], "black_king": ["e3"]}
20 changes: 20 additions & 0 deletions PGN_Sample_Games/DeepBlue_GarryKasparov_02101996.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Event "Match"]
[Site "Philadelphia, PA USA"]
[Date "1996.02.10"]
[EventDate "?"]
[Round "1"]
[Result "1-0"]
[White "Deep Blue (Computer)"]
[Black "Garry Kasparov"]
[ECO "B22"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "73"]

1.e4 c5 2.c3 d5 3.exd5 Qxd5 4.d4 Nf6 5.Nf3 Bg4 6.Be2 e6 7.h3
Bh5 8.O-O Nc6 9.Be3 cxd4 10.cxd4 Bb4 11.a3 Ba5 12.Nc3 Qd6
13.Nb5 Qe7 14.Ne5 Bxe2 15.Qxe2 O-O 16.Rac1 Rac8 17.Bg5 Bb6
18.Bxf6 gxf6 19.Nc4 Rfd8 20.Nxb6 axb6 21.Rfd1 f5 22.Qe3 Qf6
23.d5 Rxd5 24.Rxd5 exd5 25.b3 Kh8 26.Qxb6 Rg8 27.Qc5 d4 28.Nd6
f4 29. Nxb7 Ne5 30.Qd5 f3 31.g3 Nd3 32.Rc7 Re8 33.Nd6 Re1+
34.Kh2 Nxf2 35.Nxf7+ Kg7 36.Ng5+ Kh6 37.Rxh7+ 1-0
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/19moves.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. e4 e5 2. Nf3 Nf6 3. h3 h6 4. Nxe5 Nxe4 5. Qe2 Nf6 6. Nc6+ Qe7 7. Nxe7 Bxe7 8. Nc3 Nc6 9. d3 O-O 10. Qd1 Re8 11. Be2 Bc5 12. O-O Nh5 13. Bxh5 g6 14. Bg4 h5 15. Bf3 g5 16. Be2 b6 17. Bd2 Bb7 18. a3 b5 19. a4 b4 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/CastledAfterCheckBug.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. e4 e5 2. Ba6 Nxa6 3. Nc3 Nf6 4. d3 d5 5. exd5 Be6 6. dxe6 fxe6 7. Nd5 exd5 8. Qh5+ Nxh5 9. Bg5 Qxg5 10. Nf3 Qxg2 11. Ke2 Bc5 12. d4 Nf4+ 13. Kd2 Qxf3 14. dxc5 Nxc5 15. c3 Qxf2+ 16. O-O-O O-O *
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event "Match"]
[Site "Philadelphia, PA, USA"]
[Date "1996.02.10"]
[Round "1"]
[White "Deep Blue (Computer)"]
[Black "Garry Kasparov"]
[Result "1-0"]
[ECO "B22"]
[TimeControl "0"]
[WhiteElo "?"]
[BlackElo "?"]

1. e4 c5 2. c3 d5 3. exd5 Qxd5 4. d4 Nf6 5. Nf3 Bg4 6. Be2 e6 7. h3 Bh5 8. O-O Nc6 9. Be3 cxd4 10. cxd4 Bb4 11. a3 Ba5 12. Nc3 Qd6 13. Nb5 Qe7 14. Ne5 Bxe2 15. Qxe2 O-O 16. Rac1 Rac8 17. Bg5 Bb6 18. Bxf6 gxf6 19. Nc4 Rfd8 20. Nxb6 axb6 21. Rfd1 f5 22. Qe3 Qf6 23. d5 Rxd5 24. Rxd5 exd5 25. b3 Kh8 26. Qxb6 Rg8 27. Qc5 d4 28. Nd6 f4 29. Nxb7 Ne5 30. Qd5 f3 31. g3 Nd3 32. Rc7 Re8 33. Nd6 Re1+ 34. Kh2 Nxf2 35. Nxf7+ Kg7 36. Ng5+ Kh6 37. Rxh7+ *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/bishop_d4_badcpumove.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. e3 h6 2. g4 g5 3. h4 c6 4. d4 gxh4 5. Rh3 Bg7 6. d5 h5 7. Rg3 hxg3 8. fxg3 b5 9. Bc4 bxc4 10. b3 Bxa1 11. bxc4 Qb6 12. Qe2 Qxb1 13. Qd2 hxg4 14. Qa5 Qxc1+ 15. Ke2 Qxg1 16. Qc7 Ba6 17. Qf4 Bg7 18. Qxg4 Bd4 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/blackknightg5badmove.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. h4 h6 2. a4 g5 3. h5 f6 4. f4 gxf4 5. e3 fxe3 6. dxe3 e6 7. e4 Bg7 8. c4 c6 9. Bd3 d5 10. Nf3 Bd7 11. O-O f5 12. exf5 Bc8 13. Be2 exf5 14. Ng5 hxg5 15. Bd3 d4 16. c5 Bf8 17. Bc4 Ne7 18. Re1 Nd7 19. Be6 Nxc5 20. Bxc8 Qxc8 21. Na3 b6 22. Nc4 Qb7 23. Ne5 O-O-O 24. Nf7 Re8 25. Nxh8 Nd5 26. Rxe8+ Kd7 27. Rxf8 g4 28. Rf7+ Kc8 29. Rxb7 Nxb7 30. h6 g3 31. Bd2 Na5 32. b3 Nb7 33. b4 Nc3 34. Bxc3 dxc3 35. Qd2 cxd2 36. Rd1 Nd6 37. Rxd2 Ne8 38. Ng6 a6 39. Nf4 Nf6 40. Nd5 *
11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/blackwins_part1.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result ""]
[ECO ""]
[BlackElo ""]

1. e4 e5 2. Nc3 b6 3. Nb5 a6 4. Nc3 f5 5. h3 f4 6. g4 fxg3 7. a3 gxf2+ 8. Kxf2 Qf6+ 9. Kg2 Nh6 10. b4 b5 11. Nxb5 axb5 12. Bb2 c5 13. h4 c4 14. h5 c3 15. d4 cxb2 16. a4 bxa1=Q 17. a5 Qxd1 18. a6 Qg4+ 19. Kh2 Qgh4+ 20. Bh3 Nf5 21. c3 d6 22. Ne2 d5 23. Nc1 Qg3# 0-1
11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/blackwins_part2.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result ""]
[ECO ""]
[BlackElo ""]

1. e3 e6 2. h3 h6 3. h4 h5 4. g3 g5 5. hxg5 e5 6. a3 e4 7. d4 Qxg5 8. Nc3 b5 9. Nce2 b4 10. c4 bxc3 11. bxc3 Qf6 12. Bh3 Nc6 13. Qb3 Nxd4 14. Bb2 Nxe2 15. c4 Nd4 16. Bc3 Nh6 17. a4 Ng4 18. Bb4 Bxb4+ 19. Qxb4 Nc2+ 20. Kf1 Nxb4 21. Ra2 Nc2 22. Ra1 Qxf2# 0-1
11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/cornercasepawnmaybe.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result ""]
[ECO ""]
[BlackElo ""]

1. e3 f5 2. Nc3 f4 3. Na4 a6 4. exf4 b6 5. f3 a5 6. f5 b5 7. f4 g5 8. fxg6 e5 9. Nf3 b4 10. Bc4 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/finished_game.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event "brads house"]
[Site "www.bradwyatt.com"]
[Date "5/9/2021"]
[Round "1"]
[White "bradjr"]
[Black "bradwyatt"]
[Result "1-0"]
[ECO ""]
[TimeControl "0"]
[WhiteElo "1600"]
[BlackElo "1500"]

1. e4 e5 2. Nf3 Nf6 3. Nxe5 Nxe4 4. Qe2 Nf6 5. Nc6+ Qe7 6. Nxe7 Bxe7 7. Nc3 h6 8. d4 Nh5 9. Bf4 O-O 10. h3 Nxf4 11. Qe3 Nd5 12. Nxd5 Re8 13. O-O-O Bf6 14. Qxe8+ Kh7 15. Qe4+ Kh8 16. Nxf6 b6 17. Qh7# 1-0
11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/ithinkthisnotationiswrong.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result ""]
[ECO ""]
[BlackElo ""]

1. e4 e5 2. g4 f5 3. Ne2 a6 4. Nec3 a5 5. Qe2 a4 6. Qd1 a3 7. Be2 axb2 8. f4 bxa1=Q 9. Nb5 Qxb1 10. Nxc7+ Qxc7 11. Bd3 fxe4 12. O-O exd3 13. Qf3 Qxc1 14. cxd3 Q7c2 15. Qe4 Q2d1 16. Qd4 Qdxf1# 0-1
11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/kingsidecastletest.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event """"]
[Site """"]
[Date """"]
[Round """"]
[White """"]
[Black """"]
[Result """"]
[ECO """"]
[BlackElo """"]

1. e4 e5 2. Nf3 Nf6 3. Bc4 Nc6 4. d4 Nb4 5. d5 c5 6. dxc6 d5 7. cxb7 Bc5 8. O-O O-O 9. Re1 Re8 10. bxc8=Q Qxc8 11. a3 Nc6 12. b4 a5 13. c3 axb4 14. a4 b3 15. Na3 b2 16. Nb5 b1=Q 17. Qd2 Bxf2+ 18. Qxf2 Qxc1 19. Qb6 Qxa1 20. Kh1 Nh5 21. Ng5 Rxa4 22. Qb7 Qa8 23. Qxf7+ Kh8 24. Nc7 Qb1 25. Nxd5 g6 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/lotsofmoves.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event "unrated untimed match"]
[Site "Free Internet Chess Server"]
[Date "2021.04.24"]
[Round "?"]
[White "bradjr"]
[Black "bradjr"]
[Result "*"]
[ECO "A00"]
[TimeControl "0"]
[WhiteElo "1346"]
[BlackElo "1346"]

1. h4 a6 2. h5 g5 3. hxg6 hxg6 4. e4 a5 5. Qf3 a4 6. b3 axb3 7. Rh2 b2 8. a4 bxa1=Q 9. Bc4 d6 10. Bb5+ Bd7 11. Bc4 Ra5 12. Nh3 Re5 13. Ng1 Rxe4+ 14. Kf1 Re2 15. Rh3 Rh7 16. Rh2 Rh8 17. Qg3 f6 18. Qf3 g5 19. Qg3 g4 20. Qf4 f5 21. Qg3 Nf6 22. Qc3 b6 *
11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/lotsofpawntest.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result ""]
[ECO ""]
[BlackElo ""]

1. f4 g6 2. h4 h5 3. g4 f5 4. a3 g5 5. e4 fxg4 6. f5 e6 7. Nc3 exf5 8. d4 c5 9. a4 d5 10. b3 dxe4 11. b4 Nf6 12. a5 b5 13. axb6 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/na5makesnosense.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. Nf3 h6 2. e4 g5 3. h4 gxh4 4. g3 hxg3 5. Rh2 gxh2 6. d4 h1=Q 7. c4 h5 8. Bd2 Nc6 9. d5 Na5 10. Na3 Nc6 11. Qc2 Qxf3 12. c5 Na5 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/nf4badmove.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. h4 h6 2. a4 g5 3. h5 f6 4. f4 gxf4 5. e3 fxe3 6. dxe3 e6 7. e4 Bg7 8. c4 c6 9. Bd3 d5 10. Nf3 Bd7 11. O-O f5 12. exf5 Bc8 13. Be2 exf5 14. Ng5 hxg5 15. Bd3 d4 16. c5 Bf8 17. Bc4 Ne7 18. Re1 Nd7 19. Be6 Nxc5 20. Bxc8 Qxc8 21. Na3 b6 22. Nc4 Qb7 23. Ne5 O-O-O 24. Nf7 Re8 25. Nxh8 Nd5 26. Rxe8+ Kd7 27. Rxf8 g4 28. Rf7+ Kc8 29. Rxb7 Nxb7 30. h6 g3 31. Bd2 Nf4 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/pawnc5.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. h4 h6 2. a4 g5 3. h5 f6 4. f4 gxf4 5. e3 fxe3 6. dxe3 e6 7. e4 Bg7 8. c4 c6 9. Bd3 d5 10. Nf3 Bd7 11. O-O f5 12. exf5 Bc8 13. Be2 exf5 14. Ng5 hxg5 15. Bd3 d4 16. c5 Qb6 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/preventqueenattack.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. e3 h6 2. e4 g5 3. f4 gxf4 4. Nf3 f6 5. e5 c6 6. exf6 exf6 7. Ne5 fxe5 8. d3 Qb6 9. Nc3 Bc5 10. Be2 Qb4 11. a3 Ne7 12. Kf1 O-O 13. Na2 Be3 *
11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/queensidecastle_test.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result ""]
[ECO ""]
[BlackElo ""]

1. d4 d5 2. Qd3 Qd6 3. Bf4 Bd7 4. Nc3 Nc6 5. O-O-O O-O-O 6. h4 Qxf4+ 7. e3 Qxe3+ 8. Qxe3 Ne5 9. Qxe5 *
13 changes: 13 additions & 0 deletions PGN_Sample_Games/Testing/test.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result "*"]
[ECO ""]
[TimeControl "0"]
[WhiteElo ""]
[BlackElo ""]

1. e4 e5 2. Bc4 b5 3. Bxf7 *
16 changes: 16 additions & 0 deletions PGN_Sample_Games/Testing/testgame_finishgame.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Event "unrated untimed match"]
[Site "Free Internet Chess Server"]
[Date "2021.04.24"]
[Round "?"]
[White "bradjr"]
[Black "bradjr"]
[Result "*"]
[WhiteElo "1346"]
[BlackElo "1346"]
[ECO "A00"]
[TimeControl "0"]

1. h4 a6 2. h5 g5 3. hxg6 hxg6 4. e4 a5 5. Qf3 a4 6. b3 axb3 7. Rh2 b2 8. a4
bxa1=Q 9. Bc4 d6 10. Bb5+ Bd7 11. Bc4 Ra5 12. Nh3 Re5 13. Ng1 Rxe4+ 14. Kf1
Re2 15. Qxf7# *

16 changes: 16 additions & 0 deletions PGN_Sample_Games/Testing/testgame_midgame.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Event "unrated untimed match"]
[Site "Free Internet Chess Server"]
[Date "2021.04.24"]
[Round "?"]
[White "bradjr"]
[Black "bradjr"]
[Result "*"]
[WhiteElo "1346"]
[BlackElo "1346"]
[ECO "A00"]
[TimeControl "0"]

1. h4 a6 2. h5 g5 3. hxg6 hxg6 4. e4 a5 5. Qf3 a4 6. b3 axb3 7. Rh2 b2 8. a4
bxa1=Q 9. Bc4 d6 10. Bb5+ Bd7 11. Bc4 Ra5 12. Nh3 Re5 13. Ng1 Rxe4+ 14. Kf1
Re2 *

11 changes: 11 additions & 0 deletions PGN_Sample_Games/Testing/whitecastlekingtest.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Event ""]
[Site ""]
[Date ""]
[Round ""]
[White ""]
[Black ""]
[Result ""]
[ECO ""]
[BlackElo ""]

1. e4 e5 2. Nf3 Nf6 3. Bb5 a6 4. O-O a5 5. Re1 *
24 changes: 24 additions & 0 deletions PGN_Sample_Games/carlsen_kasparov_2004.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[Event "Reykjavik Rapid"]
[Site "Reykjavik ISL"]
[Date "2004.03.18"]
[EventDate "2004.03.17"]
[Round "1.1"]
[Result "1/2-1/2"]
[White "Magnus Carlsen"]
[Black "Garry Kasparov"]
[ECO "D52"]
[WhiteElo "2484"]
[BlackElo "2831"]
[PlyCount "103"]

1. d4 d5 2. c4 c6 3. Nf3 Nf6 4. Nc3 e6 5. Bg5 Nbd7 6. e3 Qa5
7. Nd2 Bb4 8. Qc2 O-O 9. Be2 e5 10. O-O exd4 11. Nb3 Qb6
12. exd4 dxc4 13. Bxc4 a5 14. a4 Qc7 15. Rae1 h6 16. Bh4 Bd6
17. h3 Nb6 18. Bxf6 Nxc4 19. Ne4 Bh2+ 20. Kh1 Nd6 21. Kxh2
Nxe4+ 22. Be5 Nd6 23. Qc5 Rd8 24. d5 Qd7 25. Nd4 Nf5 26. dxc6
bxc6 27. Nxc6 Re8 28. Rd1 Qe6 29. Rfe1 Bb7 30. Nd4 Nxd4
31. Qxd4 Qg6 32. Qg4 Qxg4 33. hxg4 Bc6 34. b3 f6 35. Bc3 Rxe1
36. Rxe1 Bd5 37. Rb1 Kf7 38. Kg3 Rb8 39. b4 axb4 40. Bxb4 Bc4
41. a5 Ba6 42. f3 Kg6 43. Kf4 h5 44. gxh5+ Kxh5 45. Rh1+ Kg6
46. Bc5 Rb2 47. Kg3 Ra2 48. Bb6 Kf7 49. Rc1 g5 50. Rc7+ Kg6
51. Rc6 Bf1 52. Bf2 1/2-1/2
15 changes: 15 additions & 0 deletions PGN_Sample_Games/de_los_santos_polgar_1990.pgn
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Event "Chess Olympiad (Women)"]
[Site "Novi Sad YUG"]
[Date "1990.11.18"]
[EventDate "?"]
[Round "2"]
[Result "0-1"]
[White "Isabel De Los Santos"]
[Black "Zsuzsa Polgar"]
[ECO "B27"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "22"]

1.e4 c5 2.Nf3 g6 3.Nc3 Bg7 4.d4 cxd4 5.Nxd4 Nc6 6.Be3 Nf6 7.f3
O-O 8.Bc4 Qb6 9.Qd2 Nxe4 10.fxe4 Bxd4 11.Bh6 Qxb2 0-1
Loading