pensquid / yobmef

Weird toy chess engine written *very much from scratch* in Rust.
14 stars 1 forks source link

Bishop deletes pawn without taking it #1

Closed UlisseMini closed 3 years ago

UlisseMini commented 3 years ago

position startpos moves e2e4 a7a5 f1a6

Gives

side to move: Black
8 r n b q k b n r
7 . p p p p p p p
6 B . . . . . . .
5 . . . . . . . .
4 . . . . P . . .
3 . . . . . . . .
2 P P P P . P P P
1 R N B Q K . N R
  a b c d e f g h

Somehow the a5 pawn vanishes. I believe this to be a problem with en-passant. Looking into this now.

UlisseMini commented 3 years ago

Confirmed problem with en-passant, Refactoring code so I can fix it without committing grave sin

UlisseMini commented 3 years ago

I fixed it by committing grave sin (make_move_mut is too far gone I'm going to procrastinate refactoring it as long as possible)