use min2phase::{random_cube, random_moves, from_moves, solve};
fn main() {
println!("Generate a random cube:");
let cube: String = random_cube();
println!("Generated: {}", cube);
println!("Solve it in 21 moves...");
let solution: String = solve(&cube, 21);
println!("Result: {}", solution);
println!("Generate 30 random moves:");
let moves: String = random_moves(30);
println!("Generated: {}", moves);
println!("Get scrambled cube:");
let cube: Option<String> = from_moves(&moves);
if let Some(cube) = cube {
println!("Generated: {}", cube);
println!("Solve it in 21 moves...");
let solution = solve(&cube, 21);
println!("Result: {}", solution);
} else {
println!("Parse scramble error: {}", moves);
}
}