rubiks-cross-trainer

1.0.6 • Public • Published

Travis build status Codecov branch npm downloads MIT License

gzip size size

Maintainability PRs Welcome

Logo
Rubik's Cross Trainer 🏋️

A JavaScript library that gives you Rubiks cube scrambles to practice forming your cross.

Getting started

npm install --save rubiks-cross-trainer

Why?

Forming the cross on your Rubik's Cube is the first step in CFOP. It should never take more than 8 moves to form your cross, and this library gives you a chance to practice at your own comfort.

API

import getRandomSolve from "rubiks-cross-trainer";
 
const scramble = getRandomSolve(1);
console.log(scramble);
// "F2 D' F2 U2 L' U' R2 F' R2 D' B' R2 U2 B U2 B' L2 D2 B U2 B"
// Returns a scramble that requires 1 move to form the cross
 
const anotherScramble = getRandomSolve(8);
console.log(anotherScramble);
// "B D2 U2 F' D2 F2 D2 R2 D2 B' F' D B L' D F R B U' R2"
// Returns a scramble that requires 8 moves to form the cross
 
const moreThanEightMoves = getRandomSolve(100);
console.log(moreThanEightMoves);
// undefined
// Returns undefined for ranges outside of 1-8

Inspiration

This JavaScript library was inspired by this Reddit thread.

Package Sidebar

Install

npm i rubiks-cross-trainer

Weekly Downloads

5

Version

1.0.6

License

MIT

Last publish

Collaborators

  • newyork.anthonyng