The board has to have persistent memory of certain events, for instance captures and pawn moves for the sake of the fifty move rule, information about the kings and rooks for castling, and the location of the enPassant square after each move. This means we will have to extract the following board fields into another struct and add an array to the board with them:
info.castleWhite
info.castleBlack
info.staleMoves
info.enPassant
I have fixed this and made the appropriate changes to board.c so that all of the code there now uses this representation. Still not tracked though is the three move stalemate rule.
The board has to have persistent memory of certain events, for instance captures and pawn moves for the sake of the fifty move rule, information about the kings and rooks for castling, and the location of the enPassant square after each move. This means we will have to extract the following board fields into another struct and add an array to the board with them: info.castleWhite info.castleBlack info.staleMoves info.enPassant
and update their usage accordingly.