rubiks_moves/lib.rs
1//! A crate for manipulating algorithms for the Rubik's cube, and speed-cubing
2//!
3//! # Examples
4//!
5//! ```
6//! use rubiks_moves::moves::Algorithm;
7//!
8//! let sexy = Algorithm::from("R U R' U'").unwrap();
9//!
10//! assert_eq!(sexy.order(), 6);
11//! ```
12//!
13//! ```
14//! use rubiks_moves::moves::Algorithm;
15//!
16//! 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();
17//! let solution = Algorithm::from("D2 F' D2 U2 F' L2 D R2 D B2 F L2 R' F' D U'").unwrap();
18//!
19//! assert!(solution.solves(&scramble));
20//! ```
21
22#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
23
24// https://jperm.net/3x3/moves
25mod cube;
26
27pub mod moves;