rubiks-moves

Crates.iorubiks-moves
lib.rsrubiks-moves
version0.0.4
sourcesrc
created_at2023-03-04 03:51:53.40275
updated_at2023-03-08 04:37:42.700389
descriptionA library focusing on processing moves for 3x3 Rubiks cube
homepage
repositoryhttps://github.com/roboteng/rubiks-moves
max_upload_size
id800334
size39,630
Trevor Settles (roboteng)

documentation

README

rubiks-moves

A crate for manipulating algorithms for the Rubik's cube, and speed-cubing

Examples

use rubiks_moves::moves::Algorithm;

let sexy = Algorithm::from("R U R' U'").unwrap();

assert_eq!(sexy.order(), 6);
use rubiks_moves::moves::Algorithm;

let scramble = Algorithm::from("R' U' F D2 L2 F R2 U2 R2 B D2 L B2 D' B2 L' R' B D2 B U2 L U2 R' U' F").unwrap();
let solution = Algorithm::from("D2 F' D2 U2 F' L2 D R2 D B2 F L2 R' F' D U'").unwrap();

assert!(solution.solves(&scramble));

License: MIT

Commit count: 25

cargo fmt