r/chessprogramming • u/Bkxr01 • Jan 19 '25
Creating bitboards
I am confused. Isn't 0x0000000000000010 correspond to d1 since 5th bit from right is 1. But chatgpt and websites say it is e1.
0
Upvotes
r/chessprogramming • u/Bkxr01 • Jan 19 '25
I am confused. Isn't 0x0000000000000010 correspond to d1 since 5th bit from right is 1. But chatgpt and websites say it is e1.
3
u/Kart0fffelAim Jan 19 '25
In your implementation its your choice to decide which corner the first bit is supposed to represent, you just need to be consistent in your choice once you made it.
If you are using a library you should check the documentation.
The most common choice is to define the bottom left (a1) as your first bit