cube-scramble.js

1.0.17 • Public • Published

🧩 CubeScrambler

Unofficial scrambler for WCA puzzles cubes using Vanilla JS

Usage

To see all of the scramble types available, use scrambleList

const scrambler = require('cube-scramble.js');
const types = scrambler.scrambleList; // returns an array

To generate a scramble, use the scramble function

const scrambler = require('cube-scramble.js');
const type = 'pyraminx';
const sequence = scramblers.scramble(type); // returns an array

You can also use import statements in a variety of ways:
Import the scramble function

import { scramble } from 'cube-scramble.js';
const type = '3x3';
const sequence = scramble(type);
console.log(sequence);

Import the scrambleList property

import { scrambleList as types } from 'cube-scramble.js';
console.log(types);

You can also import specific scramble types. Note that this currently doesn't work for NxN cubes.

import { pyraminx } from 'cube-scramble.js';
const sequence = pyraminx();
console.log(sequence);

If an invalid type is used, you will see the following message: Error: Invalid scramble type provided.

Package Sidebar

Install

npm i cube-scramble.js

Weekly Downloads

0

Version

1.0.17

License

MIT

Unpacked Size

6.45 kB

Total Files

3

Last publish

Collaborators

  • nerdygamer