fn update_board_info(&mut self) {
        let mut cell_counts = HashMap::new();

        for here in self.locations() {
            let cell = self[here];
            let e = cell_counts.entry(cell).or_insert(0);
            *e += 1;
        }

        self.cell_counts = cell_counts;
        self.game_over = self.find_valid_moves(Cell::White).is_empty()
            && self.find_valid_moves(Cell::Black).is_empty();
    }
/// Updates the state of hte board to reflect the
/// cell array; this updates the counts of cells and
/// game over flag.
Updates the state of hte board to reflect the
cell array; this updates the counts of cells and
game over flag.
Updates the state of hte board to reflect the cell array ; this updates the counts of cells and game over flag .
fn update_board_info(&mut self) {
        let mut cell_counts = HashMap::new();
        for here in self.locations() {
            let cell = self[here];
            let e = cell_counts.entry(cell).or_insert(0);
            *e += 1;
        }
        self.cell_counts = cell_counts;
        self.game_over = self.find_valid_moves(Cell::White).is_empty()
            && self.find_valid_moves(Cell::Black).is_empty();
    }
fn update_board_info ( & mut self ) { let mut cell_counts = HashMap :: new ( ) ; for here in self . locations ( ) { let cell = self [ here ] ; let e = cell_counts . entry ( cell ) . or_insert ( 0 ) ; * e += 1 ; } self . cell_counts = cell_counts ; self . game_over = self . find_valid_moves ( Cell :: White ) . is_empty ( ) && self . find_valid_moves ( Cell :: Black ) . is_empty ( ) ; }
Updates the state of hte board to reflect the
cell array; this updates the counts of cells and
game over flag.
Updates the state of hte board to reflect the cell array ; this updates the counts of cells and game over flag .
&mut self
&mut self