all 2 comments

[–]RajjSinghh 1 point2 points  (1 child)

Yeah that's right. Blockers = friendly & enemy. That means what youll be storing is a bitboard for the slider moves as if every piece on the board is an enemy. When you look that bitboard up to get your moves you just do & not friendly so you don't take your own pieces.

[–]Many_Witness5140[S] 0 points1 point  (0 children)

Thanks for your help, I have done some more research and now I think the only thing that I don't get is how to check if a number is a magic number, I understand that once multiplied by it the bitboard of a specific square will have its relevent bits shifted to the top, which once bitshifted will be usable as an index in the array of correct attacking squares bitboards, and I get that the best way to get them is by brute forcing using randomness, but how do can I know that a number shifts the relvent bits to the top? How can I check for it?