Crate haitaka_types

Crate haitaka_types 

Source
Expand description

haitaka-types ハイタカ型

§Internal package for haitaka

This package defines the core data types used in haitaka. It’s not intended as stand-alone library (though nothing will prevent you from using it like that).

Splitting off the data types into a separate crate allows haitaka to run a build script to generate slider move hash tables used in move generation based on magic bitboard. Without a separate crate to run against the build script would have to duplicate quite a bit of code or the library would need a separate initialization function – either as a hidden, lazy initialization or as an explicit initialization step. Both those alternatives are less than ideal.

Setting up a separate crate also ensures a clearer separation of concerns making the codebase easier to maintain, test, and extend.

Re-exports§

pub use bitboard::*;
pub use color::*;
pub use file::*;
pub use piece::*;
pub use rank::*;
pub use shogi_move::*;
pub use sliders::*;
pub use square::*;

Modules§

bitboard
A BitBoard implementation
color
The Color enum
file
The File enum represents the files (columns) on a Shogi board
helpers
Macros
piece
Piece representation
rank
The Rank enum represents the ranks (rows) on a Shogi board
shogi_move
A simple Move enum to represent moves
sliders
square
The Square enum represent squares on a Shogi board

Macros§

bitboard
BitBoard literal macro.
simple_error