Open kalebburnham opened 4 years ago
Quiescent and attacking moves for these pieces can be generated together. It is not expensive to generate all moves then check intersects to update flags. The bishopAttacks/rookAttacks/knightAttacks functions can be used for each square containing each piece, with the returned bitboard Singularized and BSFed to find the To square.
As of 20-Dec-2020, knight moves can be generated in this manner.
Generating quiescent and attacking moves for pawns works because they attack differently than they push. Should attacking and quiescent moves for these pieces be considered together? Squares attacked by each piece can be generated using bishopAttacks, rookAttacks, etc., but these functions return bitboards when we need Moves. A check would see if an opposing piece is on the To square, then the move flag would be set to 0x04.