Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in .moves() method while castling? #30

Closed
bezigon opened this issue Mar 23, 2013 · 1 comment
Closed

Bug in .moves() method while castling? #30

bezigon opened this issue Mar 23, 2013 · 1 comment

Comments

@bezigon
Copy link

bezigon commented Mar 23, 2013

[15:40:01.593] var chess = new Chess()
[15:40:01.594] undefined
[15:40:19.412] chess.load('rnbqk2r/ppp1pp1p/5n1b/3p2pQ/1P2P3/B1N5/P1PP1PPP/R3KBNR b KQkq - 3 5')
[15:40:19.414] true
[15:42:42.097] chess.moves({'square' : 'f1', 'verbose' : true})
[15:42:42.099] [{color:"b", from:"e8", to:"g8", flags:"k", piece:"k", san:"O-O"}]

@jhlywa
Copy link
Owner

jhlywa commented Mar 24, 2013

Yep, that's definitely a bug. Thanks for the report.

jhlywa added a commit that referenced this issue Mar 24, 2013
This fix prevents castling moves from being included in single-piece
move generation; unless of course, the piece is a king.

Fixes issue #30.
@jhlywa jhlywa closed this as completed Mar 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants