Closed chstan closed 12 years ago
I have changed the board representation to be much cleaner than it was before, some of the code in board.c needs to be updated still, but on the whole it is much more readable now. Unfortunately, the rules of chess maintain that some pieces have to be special cases, as in kings which have their own array in the board structure, and so conditionals still exist in the code.
The board representation should now properly track en passant moves, castling, and the fifty move stalemate rule. Still not tracked is the three move repetition rule. The code in board.c has been refactored to reflect these changes, and helpers were added in move.c which simplify making and unmaking moves on the new board representation.
The board representation currently uses named fields for the bitboards. Changing this to an array index by the piece identifiers would reduce the amount of spaghetti code substantially.