Relative Content

Tag Archive for chessbitboard

Storing piece attacks for bitboards

I know that to store the knight’s attacks for example I begin by initializing an array of 64 uint64s representing all the possible knight attacks and fill it up then whenever I need the move of a knight I can just get its index in the array of attacks but that only works for knights, how would I do it for other pieces such as pawns?