[][src]Function connect6::game::search

pub fn search(table: &Board) -> Player

Algorithm for finding winner of the Connect6.

Algorithm finds the continuous 6 stones on 4 directions, vertical, horizontal, two diagonals. Use dynamic programming to implement algorithm and swaping memories to obtain the memory efficiency.

Examples

let mut game = Game::new();
game.set((3, 4)).unwrap();

let winner = search(game.get_board());
assert_eq!(winner, Player::None);