pioz / chess

A fast chess library that use bitboards to play chess with Ruby
GNU Lesser General Public License v3.0
59 stars 17 forks source link

Unexpected behavoir moving a piece #31

Closed justbyitself closed 3 weeks ago

justbyitself commented 3 weeks ago

I've found an unexpected beahvoir in pioz/chess. When my board is like this:

8 . . . . Q . . . 
7 . . . . . . . . 
6 . . . . . . . . 
5 . . . . . . . . 
4 . . . . . . . . 
3 . . . . . . . . 
2 . . . . K . . . 
1 . . . . . . . k 
  a b c d e f g h

and I try game << 'e8a8', I get this board:

8 . . Q . . . . . 
7 . . . . . . . . 
6 . . . . . . . . 
5 . . . . . . . . 
4 . . . . . . . . 
3 . . . . . . . . 
2 . . . . K . . . 
1 . . . . . . . k 
  a b c d e f g h

Piece (Q) moved from e8 to c8, instead a8, why? Note: No exception raises

A gist in order to reproduce this issue: https://gist.github.com/justbyitself/e4d4615a17181526f0359f3437221053

Thank you for your library.

pioz commented 3 weeks ago

Ok, I'll check in the next few days! Thanks for the issue.

pioz commented 3 weeks ago

I've fix the problem here. You can install the new release v0.3.5.

Please, let me know if the issue is fixed. Thanks.

justbyitself commented 3 weeks ago

OK. Fixed! Thanks.