pub fn check_move(&mut self) -> Cell {
        if self.ongoing_movement.is_valid() {
            let now = Instant::now();
            while now >= self.next_move_time {
                self.next_move_time += Duration::from_millis(100);

                if !self.ongoing_movement.play_one(&mut self.board) {
                    break;
                }

                if !self.ongoing_movement.is_valid() {
                    let f = self.next_move.flipped();

                    if !self.board.find_valid_moves(f).is_empty() {
                        self.next_move = f;
                    }
                }
            }
        }

        if self.ongoing_movement.is_valid() {
            Cell::Empty // while a movement it ongoing, it is nobody's turn
        } else {
            self.next_move
        }
    }
/// Checks the game staet and returns the cell of the player
/// whose move it now is. This will also apply ongoing moves, so it
/// can change the game state. If there are any ongoing moves pending
/// when it returns, it returns Empty- nobody can move until outstanding
/// moves clear.
///
/// Outsanding moves run on a timer; this may do nothing (and return Empty)
/// if there are outstanding moves that are not yet due.
Checks the game staet and returns the cell of the player
whose move it now is. This will also apply ongoing moves, so it
can change the game state. If there are any ongoing moves pending
when it returns, it returns Empty- nobody can move until outstanding
moves clear.

Outsanding moves run on a timer; this may do nothing (and return Empty)
if there are outstanding moves that are not yet due.
Checks the game staet and returns the cell of the player whose move it now is . This will also apply ongoing moves so it can change the game state . If there are any ongoing moves pending when it returns it returns Empty - nobody can move until outstanding moves clear . Outsanding moves run on a timer ; this may do nothing ( and return Empty ) if there are outstanding moves that are not yet due .
pub fn check_move(&mut self) -> Cell {
        if self.ongoing_movement.is_valid() {
            let now = Instant::now();
            while now >= self.next_move_time {
                self.next_move_time += Duration::from_millis(100);
                if !self.ongoing_movement.play_one(&mut self.board) {
                    break;
                }
                if !self.ongoing_movement.is_valid() {
                    let f = self.next_move.flipped();
                    if !self.board.find_valid_moves(f).is_empty() {
                        self.next_move = f;
                    }
                }
            }
        }
        if self.ongoing_movement.is_valid() {
            Cell::Empty // while a movement it ongoing, it is nobody's turn
        } else {
            self.next_move
        }
    }
pub fn check_move ( & mut self ) -> Cell { if self . ongoing_movement . is_valid ( ) { let now = Instant :: now ( ) ; while now >= self . next_move_time { self . next_move_time += Duration :: from_millis ( 100 ) ; if ! self . ongoing_movement . play_one ( & mut self . board ) { break ; } if ! self . ongoing_movement . is_valid ( ) { let f = self . next_move . flipped ( ) ; if ! self . board . find_valid_moves ( f ) . is_empty ( ) { self . next_move = f ; } } } } if self . ongoing_movement . is_valid ( ) { Cell :: Empty // while a movement it ongoing, it is nobody's turn } else { self . next_move } }
Checks the game staet and returns the cell of the player
whose move it now is.
Checks the game staet and returns the cell of the player whose move it now is .
&mut self
&mut self