@biohuns/scramblerjs
Javascript Rubik's Cube Scramble Generator
Last updated 8 months ago by biohuns .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @biohuns/scramblerjs 
SYNC missed versions from official npm registry.

Build Status

Scrambler - 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 scramblerjs
scramblerjs

Node.js

npm install scramblerjs
var Scrambler = require("scrambler");

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

Browser

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

<script>
  var threebythree = new Scrambler(); // 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

Current Tags

  • 0.9.0                                ...           latest (8 months ago)

1 Versions

  • 0.9.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |