chstan / Chess-Engine

A weak C language chess engine
5 stars 1 forks source link

The board has no memory #9

Closed chstan closed 12 years ago

chstan commented 12 years ago

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.

chstan commented 12 years ago

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.