Bitboard Move Generation
Posted: 04 Jan 2011, 20:46
I am a total newbie at coding a chess engine -- I just started a few days ago -- and I am a little at a loss about a few things:
Thanks in advance!
- Moshe
- After using bitwise operations to generate the bitboard of squares that a piece can move to (e.g.: whiteKnight & KNIGHT_ATTACKS[currSquare] & ~whitePiecesBitboard), do I then have to loop through it and extract the moves? Isn't this kind of wasteful?
- With rotating bitboard, how do you rotated the board by 45 degrees (for bishop and queen moves)?
- Instead of rotating the board, can't you just have a whole bunch of lookup tables for horizontal, vertical, and diagonal moves?
Thanks in advance!
- Moshe