[board, explorer, moves] Make Board::active_color private
Make the struct attribute private, and export two new methods. A getter, active_color(), and a setter, set_active_color(). Update all references to the attribute to use the methods.
This commit is contained in:
parent
cae93cb090
commit
eaab34587c
10 changed files with 55 additions and 40 deletions
|
@ -13,7 +13,7 @@ macro_rules! test_board {
|
|||
chessfriend_core::Square::$square,
|
||||
$crate::PlacePieceStrategy::default());
|
||||
)*
|
||||
board.active_color = chessfriend_core::Color::$to_move;
|
||||
board.set_active_color(chessfriend_core::Color::$to_move);
|
||||
board.en_passant_target = Some(chessfriend_core::Square::$en_passant);
|
||||
|
||||
println!("{}", board.display());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue