JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q56811F
  • License MIT

Javascript Rubik's Cube Scramble Generator

Package Exports

  • scrambo

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (scrambo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status

Scrambo - Puzzle Scramble Generator

scrambo

Usage

// Generate a new 4x4 scramble with the seed of 1
var seeded_scramble = new Scrambo().type('444').seed(1).get();
console.log(seeded_scramble);

// Generate 5 scrambles (defaults to 3x3)
var multiple_scrambles = new Scrambo().get(5);
console.log(multiple_scrambles);

Cli

npm install -g scrambo
scrambo

Node.js

npm install scrambo
var Scrambo = require('scrambo');

var threebythree = new Scrambo(); // Defaults to 3x3
console.log(threebythree.get(5)); // Returns 5 scrambles

Browser

<script src="scrambo.js"></script>

<script>
  var threebythree = new Scrambo(); // Defaults to 3x3
  console.log(threebythree.get(5)); // Returns 5 scrambles
</script>

API

.get(num); // Returns a number of scrambles, defaults to 1.
.type(str); // Sets the scramble type, defaults to 333.
.seed(num); // Repeatable scrambles.
.length(num); // Set scramble length, currently only for NNN, minx scrambles.

Current status

Alpha, but works!

Credits

This is a fork of jsss