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

Fixed issue in Game copying #14

Merged
merged 1 commit into from
Feb 7, 2017
Merged

Fixed issue in Game copying #14

merged 1 commit into from
Feb 7, 2017

Conversation

Hengyu
Copy link
Contributor

@Hengyu Hengyu commented Feb 7, 2017

I don't know whether it is deliberate for not adding the code self.enPassantTarget = game.enPassantTarget.
But not adding this line will cause the following issue:

Let's suppose a game A is in an "En Passant" state, that is, the next player who moves the piece can make an en passant move. Apparently, calling myGame.isLegal(move: myEnPassantMove) will return true. But if we call myGame.copy().isLegal(move: myEnPassantMove), it will return false which is not act as "expected".

@nvzqz nvzqz merged commit 394033b into nvzqz:develop Feb 7, 2017
@nvzqz
Copy link
Owner

nvzqz commented Feb 7, 2017

This was most likely an oversight. Thanks for catching it!

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

Successfully merging this pull request may close these issues.

2 participants