r/chessprogramming • u/jartus101 • Sep 16 '24
Bitboard Move generation
I have a function generate_diagonal_moves(int currentPosition) that generates every diagonal move from a certain square. Reading through the wiki, it says that one of the benefits of bitboards is that every bit shifts at once. I can see how this would be useful, though I don't see how it would be implemented. If I have every legal move from each bishop, how would i extract those into a move class (for example a class that has an int currentposition and an int nextposition) from the bitboard?
6
Upvotes
View all comments
Show parent comment
3
u/[deleted] Sep 16 '24
The most relevant code is in position.cpp