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

fix: material diff when castling #99

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

thomas-mauran
Copy link
Owner

Fix the material difference feature when doing a castle

Description

Currently, when doing a castle the to position is the one of the Rook, this is not very good since other chess boards don't use that it could be fixed to be the one cell the king will go after castle instead.

This cause the game logic to be re thinked when adding to the material diff to avoid making the game think we just ate a piece when we just castled

Fixes #91

How Has This Been Tested?

Manually through the board itself

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: Thomas Mauran <[email protected]>
Signed-off-by: Thomas Mauran <[email protected]>
@thomas-mauran thomas-mauran added the bug Something isn't working label Nov 18, 2024
@thomas-mauran thomas-mauran self-assigned this Nov 18, 2024
@thomas-mauran thomas-mauran merged commit 75775d8 into main Nov 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Material difference bug when castling
1 participant