Reimplement Square as an enum; implement Rank and File enums
Replace the Square struct with an enum. This implementation is based on this one: https://github.com/analog-hors/magic-bitboards-demo/blob/main/types/src/square.rs This reduces a lot of code needed to construct squares, ranks, and files.
This commit is contained in:
parent
1689da9908
commit
2105004dc2
2 changed files with 209 additions and 165 deletions
|
@ -11,4 +11,4 @@ mod tests;
|
|||
|
||||
pub use moves::Move;
|
||||
pub use position::Position;
|
||||
pub use square::Square;
|
||||
pub use square::{File, Rank, Square};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue