[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:
Eryn Wells 2025-06-02 17:29:52 -07:00
parent cae93cb090
commit eaab34587c
10 changed files with 55 additions and 40 deletions

View file

@ -283,7 +283,7 @@ fn main() -> Result<(), String> {
loop {
if should_print_position {
println!("{}", &state.position);
println!("{} to move.", state.position.board.active_color);
println!("{} to move.", state.position.board.active_color());
}
let readline = editor.readline("\n? ");