[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
|
@ -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? ");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue