pub(crate) fn has_player_won(&self) -> bool {
        [
            WinPattern::TopRow,
            WinPattern::CentreRow,
            WinPattern::BottomRow,
            WinPattern::LeftColumn,
            WinPattern::CentreColumn,
            WinPattern::RightColumn,
            WinPattern::LeftDiagonal,
            WinPattern::RightDiagonal,
        ]
        .iter()
        .any(|p| {
            self.check_player_has_won(Player::O, *p) || self.check_player_has_won(Player::X, *p)
        })
    }
/// Checks if the active player has won the game.
Checks if the active player has won the game.
Checks if the active player has won the game .
pub(crate) fn has_player_won(&self) -> bool {
        [
            WinPattern::TopRow,
            WinPattern::CentreRow,
            WinPattern::BottomRow,
            WinPattern::LeftColumn,
            WinPattern::CentreColumn,
            WinPattern::RightColumn,
            WinPattern::LeftDiagonal,
            WinPattern::RightDiagonal,
        ]
        .iter()
        .any(|p| {
            self.check_player_has_won(Player::O, *p) || self.check_player_has_won(Player::X, *p)
        })
    }
pub ( crate ) fn has_player_won ( & self ) -> bool { [ WinPattern :: TopRow , WinPattern :: CentreRow , WinPattern :: BottomRow , WinPattern :: LeftColumn , WinPattern :: CentreColumn , WinPattern :: RightColumn , WinPattern :: LeftDiagonal , WinPattern :: RightDiagonal , ] . iter ( ) . any ( | p | { self . check_player_has_won ( Player :: O , * p ) || self . check_player_has_won ( Player :: X , * p ) } ) }
Checks if the active player has won the game.
Checks if the active player has won the game .
&self