Skip to content

Conversation

@RobotLazerShark
Copy link

@RobotLazerShark RobotLazerShark commented Jul 26, 2023

This PR fixes a bug in the ForceSkipTurn(), TrySkipTurn(), and UndoSkipTurn() methods. Currently if you use any of these three methods to change the turn and then on that same turn use IsInCheck(), you will always get back false.

I did two full runs of the tests, one where after every board setup or move I added a ForceSkipTurn() followed by an UndoSkipTurn(), and one where I updated the position setup fens to flip the turn order and then added a ForceSkipTurn() immediately after. In both cases all the tests still passed.

I did see a comment on the MakeNullMove() method in the Chess.Board class about being in check potentially being an issue, but I didn't see any (other) code that seemed like that would be an issue (and also didn't notice any issues with this in the tests).

VitorA29 added a commit to VitorA29/Chess-Challenge that referenced this pull request Aug 17, 2023
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.

1 participant