Network Pipe Manufacturer
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

Cuber

0.2.0 • Public • Published

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

Keywords

none

install

npm i Cuber

Downloadsweekly downloads

1

version

0.2.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar