marvk / chess

A chess library, chess engine, Lichess client, and UCI implementation written in Java
https://lichess.org/@/QueensGamBOT
24 stars 7 forks source link

Fix castle being possible when rook hasn't moved but has been captured #4

Closed marvk closed 5 years ago

marvk commented 5 years ago

See this game for reference. Here, the bot tried to play e1g1 (O-O), while the rook in question has already been captured.

10:54:29.922 [pool-2-thread-7] WARN  net.marvk.chess.lichess.GameThread - Failed to play move Move{source=E1, target=G1, coloredPiece=WHITE_KING, promoteTo=null} in game o3tr315Q
marvk commented 5 years ago

Followup commit https://github.com/marvk/chess/commit/dab03c923d0b7e4b2c98fc743d3a3b549e16fdf4