So I've been having some trouble wrapping my head around an issue. I'm currently writing a bitboard based chess engine in Java (its been a ride figuring everything out). So far all of the pawn/king/knight moves work as expected and without bugs.
What I need help understanding is sliding piece move generation. I have generated the array of empty board moves for each square / piece. From my current understanding I also need to develop an array that contains each possible occupancy on each square as well-- and then somehow look up that array based on a variety of methods.
Is this way of thinking about it correct? Is it a matter of picking every number from 0 to 2^63 and xor'ing it with the move bitboard for that square and then storing that with some method (magic/rotated bitboards) to initialize the array and accessing it the same way at run time?
Pseudocode and explanations are much appreciated. (I'm using the >>> by the way).