Instead of copying boards everywhere, to prepare for algorithmic searching when the chess engine is implemented, move searching has been modified to instead undo and redo moves.
Moves are first made, and the Move() function returns the move data so that the move can be later reverted
The old Move() function still exists for enpassant capture checking, but has been renamed to CopyMove()
After moves have been done, they can be undone with bitboard.UndoMove(BoardData)
This actually increased the speed to 75 million nodes a second at depth 7
Added an undo function
Instead of copying boards everywhere, to prepare for algorithmic searching when the chess engine is implemented, move searching has been modified to instead undo and redo moves.
Moves are first made, and the
Move()
function returns the move data so that the move can be later reverted The oldMove()
function still exists for enpassant capture checking, but has been renamed toCopyMove()
After moves have been done, they can be undone with
bitboard.UndoMove(BoardData)
This actually increased the speed to 75 million nodes a second at depth 7