Code Monkey home page Code Monkey logo

just-a-cube's Introduction

Just a Cube

A rubik's cube solver.

 

Play It

http://cube.zxh.io

 

Structure

├── cube
│   └── js
│       ├── lbl.js                  # Layer by layer algorithm
│       ├── two-phase.js            # Two-phase algorithm
│       ├── util.js                 # Type, shuffle and reset
│       └── initial.js              # Initial a cube
└── lib
    ├── cubejs                      # Two-phase algorithm
    └── cuber                       # Rubik's cube simulator

 

About Cube

The cube simulator is from Cuber.

Face


                                               Back(B)
                                             -----------
                                           /   Up(U)   /|
                                          /     1     / |
                                          -----------  Right(R)
                                         |           |  |
                                 Left(L) |  Front(F) |  .
                                         |           | /
                                         |           |/
                                          -----------
                                            Down(D)

 

Slice

  • Standing(S): The layer between F and B
  • Middle(M): The layer between L and R
  • Equator(E): The layer between U and D

 

Default Color

  • Front: Blue
  • Back: Green
  • Left: Orange
  • Right: Red
  • Up: Yellow
  • Down: White

 

Rotations

Face

A capital letter by each face itself means a clockwise rotation of the face while a counterclockwise turn is marked by a small letter.

For example:

  • U: A quarter clockwise turn on the Up face (90°).

  • u: A quarter counterclockwise turn on the Up face (-90°).

twist

Slice

  • S/s: Rotate slice S like a F/f

  • M/m: Rotate slice M like a L/l

  • E/e: Rotate slice E like an U/u

Whole Cube

  • X/x: Rotate the cube like a R/r
  • Y/y: Rotate the cube like an U/u
  • Z/z: Rotate the cube like a F/f

 

Algorithm

Layer By Layer (层先法)

  • The First Layer Edges | 底部棱块归位
  • The First Layer Corners | 底部角块归位
  • The Second Layer | 复原第二层
  • The Top Cross | 顶部十字
  • The Third Layer Corners (Position) | 顶部角块归位(位置)
  • The Third Layer Corners (Orient) | 顶部角块归位(方向)
  • The Third Layer Edges | 顶部棱块归位

Two-Phase Algorithm

The JavaScript implentation of Herbert Kociemba's two-phase algorithm is from cube.js.

CFOP

just-a-cube's People

Contributors

renovamen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.