Generate Chess960 starting position: Difference between revisions
Content added Content deleted
m (→Rust 1.57 nightly: Fix name of function checking RKR) |
|||
Line 2,061: | Line 2,061: | ||
is_string |
is_string |
||
} |
} |
||
fn |
fn is_rook_king_ok(str_to_check: Vec<&str>) -> bool { |
||
Regex::new(r"(.*♖.*♔.*♖.*)") |
Regex::new(r"(.*♖.*♔.*♖.*)") |
||
.unwrap() |
.unwrap() |
||
Line 2,083: | Line 2,083: | ||
} |
} |
||
fn is_candidate_valide(s: [&str; 8]) -> bool { |
fn is_candidate_valide(s: [&str; 8]) -> bool { |
||
is_rook_king_ok(s.to_vec()) && is_two_bishops_ok(s.to_vec()) |
|||
} |
} |
||
fn main() { |
fn main() { |