Commit graph

56 commits

Author SHA1 Message Date
Alex Clink
ec778a44b2 Add ability to undo a move 2021-09-26 20:52:22 -04:00
Alex Clink
a0f65efbb5 Change Game#index to Game#index_of to unshadow previous def
the method #index is defined by the enumerable module, and caused type confusion
2021-09-26 16:38:55 -04:00
Alex Clink
213eaaac2e Fix FEN regex 2021-09-25 01:42:56 -04:00
Alex Clink
f5285baf12 Parse PGN into game 2021-09-25 01:24:36 -04:00
Alex Clink
3b5382a224 Capture extra blank space when matching 2021-09-25 00:31:42 -04:00
Alex Clink
c0844b382a Add parsing pgn with comments and variations 2021-09-25 00:25:51 -04:00
Alex Clink
eafa4e0fbb Fix castling check when converting move to SAN 2021-09-25 00:24:55 -04:00
Alex Clink
a66bf70a65 Disambiguate further when a move may be illegal 2021-09-24 22:39:18 -04:00
Alex Clink
a93165f78a Better pattern matching 2021-09-24 22:39:06 -04:00
Alex Clink
9901698258 make_move no longer return SAN 2021-09-24 22:37:51 -04:00
Alex Clink
bfae01ff3e Add initial PGN file parser 2021-09-23 23:53:13 -04:00
Alex Clink
25e7f9cc9a Add remove_illegal_moves method 2021-09-22 23:04:21 -04:00
Alex Clink
e99cd86369 Separate san generation from making moves 2021-09-22 22:19:56 -04:00
Alex Clink
6b5b79451e Update move_to_san to recognize castling 2021-09-22 22:11:13 -04:00
Alex Clink
5077339246 Add checkmate detection in SAN generation 2021-09-21 23:46:32 -04:00
Alex Clink
93d5c58c57 Add method to test for checkmate 2021-09-21 21:53:15 -04:00
Alex Clink
bc75d4bc50 Bump version 2021-09-20 23:35:44 -04:00
Alex Clink
bbc5a0d893 Add intermediate square checks while castling 2021-09-20 23:34:51 -04:00
Alex Clink
3502140bdb Add promotion and promotion checks for pawns 2021-09-20 23:20:59 -04:00
Alex Clink
f96c207066 Add docs 2021-09-19 22:15:34 -04:00
Alex Clink
ced238add0 Bump version 2021-09-19 22:00:43 -04:00
Alex Clink
90a5683236 Move terminal game into own class 2021-09-19 21:59:59 -04:00
Alex Clink
1608aa7b90 Fix off by one error 2021-09-19 21:59:47 -04:00
Alex Clink
ccd3e93460 Fully set fen attributes 2021-09-19 21:11:48 -04:00
Alex Clink
3db239099f Remove redundant method 2021-09-19 18:51:51 -04:00
Alex Clink
d9ca848bc3 Add tests for check 2021-09-19 18:48:22 -04:00
Alex Clink
01625b0c9b Add extra castling specs 2021-09-19 17:34:18 -04:00
Alex Clink
c9448fe368 Fix capture distinction in notation regex 2021-09-18 17:08:28 -04:00
Alex Clink
1397a01aaf Add some specs for parsing SAN 2021-09-18 12:54:04 -04:00
Alex Clink
7614001e45 Fix castling queenside for black 2021-09-17 23:19:47 -04:00
Alex Clink
ceaaf16f80 More robust castling, fixed fen parsing 2021-09-17 00:08:53 -04:00
Alex Clink
054170871f Print pgn on side of board 2021-09-15 23:50:38 -04:00
Alex Clink
9b727ad3d5 Render full fen string 2021-09-15 22:46:34 -04:00
Alex Clink
322249c6b3 Fix index error if no players are set 2021-09-15 00:05:30 -04:00
Alex Clink
6fb1b76c65 Add castling, allow setting board-theme 2021-09-14 23:59:30 -04:00
Alex Clink
4bee64dcdd Add en passant captures 2021-09-14 00:06:17 -04:00
Alex Clink
63679d2f67 Add docs 2021-09-13 23:19:09 -04:00
Alex Clink
b056d2d445 Always disambiguate moves, update method docs
a move like bc4 previously would have moved P c2 = c4, it's most
likely that the user intended Bc4, thus disambiguation removes
the c4 square possibility, because the b file is specified
2021-09-12 23:55:15 -04:00
Alex Clink
d7623482fd Make SAN case sensitive, add ability to specify from to squares
moves that specify the b column get confused with the symbol for
a bishop. More regex magic required for case insensitivity
2021-09-12 23:37:31 -04:00
Alex Clink
d750e9cba0 Add en passant move generation 2021-09-12 15:49:19 -04:00
Alex Clink
39010fcdf2 Fix fen placement string, disambiguate moves from san 2021-09-12 00:01:54 -04:00
Alex Clink
279a9adaaa Add pawn captures, FEN placement, board turns 2021-09-11 23:20:00 -04:00
Alex Clink
466075bee9 Add moving pieces based on input SAN 2021-09-11 21:14:05 -04:00
Alex Clink
e496f6c51a Generate all pseudolegal moves 2021-09-11 00:07:22 -04:00
Alex Clink
af020fb3c6 Add more moves to generation 2021-09-09 23:59:31 -04:00
Alex Clink
5ebe8a920c Update method for consistency 2021-09-09 00:55:52 -04:00
Alex Clink
025c8b9681 Add initial SAN parsing 2021-09-09 00:52:11 -04:00
Alex Clink
c55511dcb9 Add MoveSet 2021-09-08 23:41:29 -04:00
Alex Clink
9254aa5cdf Add some basic move generation 2021-09-07 23:37:37 -04:00
Alex Clink
0e8ad2878a Consolidate classes 2021-09-07 22:41:18 -04:00