lichess-org/dartchess

Crazyhouse en passant bug with DropMove

dbergan opened this issue · 0 comments

_copyWith() carries the epSquare forward to the next move when a DropMove is played, which makes this sequence possible:

  1. d4 e5
  2. Nf3 Qg5
  3. Nxg5 Be7
  4. dxe5 Bd8
  5. Nc3 f5 (creates epSquare at f6)
  6. Q@f7 (copyWith() is given null for epSquare, which then copies the epSquare of f6 forward to Black)
    6... gxf6 (captures the Queen on f7!)