This change builds on several previous changes to implement Zobrist hashing of the board. This hash can be updated incrementally as changes are made to the board. In order to do that, various properties of the Board struct had to made internal. In the setters and various mutating members of Board, the hash is updated as state changes. The entire hashing mechanism is optional. If no ZobristState is provided when the Board is created, the hash is never computed. Plumb the Zobrist state through Position as well so that clients of Position (the ultimate interface for interacting with the chess engine) can provide global state to the whole engine. The explorer crate gives an example of how this works. Some global state is computed during initialization and then passed to the Position when it's created. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |