Generate Chess960 starting position: Difference between revisions

m
(Generate Chess960 starting position en QBasic)
Line 2,249:
let mut is_string = String::new();
for ele in v {
is_string.push_str(&ele.to_string())
}
is_string
Line 2,264:
}
fn create_rnd_candidate() -> [&'static str; 8] {
let mut prngrng = thread_rng();
let mut chaine = ["♖", "♘", "♗", "♔", "♕", "♗", "♘", "♖"];
 
loop {
chaine.shuffle(&mut prngrng);
if is_candidate_valide(chaine) {
break chaine;
Anonymous user