Cuber
Rubik's cube model and solver.
Last updated 8 years ago by patrickdevivo .
Repository · Original npm · Tarball · package.json
$ cnpm install Cuber 
SYNC missed versions from official npm registry.

##Cuber.coffee Model of a 3x3 Rubik's cube written in CoffeeScript

Usage

Require Cuber: Cuber = require './cuber.coffee'

Initialize a cube: cube = new Cube "Patrick\'s Rubik\'s Cube""

Display cube: cube.display()

Scramble cube: cube.scramble(100) (100 random turns)

Check if a cube is solver: cube.check()

Cheat cube.cheat() reverses all previous moves to return to starting (solved) state

Turn a face cube.white.cw() or cube.turn('white', 'cw) or cube.turn('w') lowercase means clockwise, uppercase means counter-clockwise

Solver solver = new Solver cube

Current Tags

  • 0.2.0                                ...           latest (8 years ago)

1 Versions

  • 0.2.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (9)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |