-
Notifications
You must be signed in to change notification settings - Fork 7
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
Move and Board need convenience methods to avoid using bitboard internals directly. #1
Comments
You should be able to use The best explanation of bitboards I know of is here on the Chess Programming Wiki. You might consider adding some helper methods on |
|
I wrote this:
Is this correct? |
In order to save space in the
So you need to check all the bitboards for pieces at that square. What you're doing above looks right! Be aware that using your helper method will incur a small performance penalty, since you're checking all 10 bitboards. However, each check is still O(1) constant time, so it's not that bad. Feel free to send me a PR if you'd like to add this to the library. |
I don't really understand how bitboards work, so I have no idea how to know which piece I'm moving or which player it belongs to.
I would really appreciate a little explanation or adding a method that allows you to obtain this information directly.
The text was updated successfully, but these errors were encountered: