Skip to content

Instantly share code, notes, and snippets.

@JoseRivas1998
Last active February 8, 2017 22:18
Show Gist options
  • Select an option

  • Save JoseRivas1998/fca72ee9c80c01b61353fcf812bc37cb to your computer and use it in GitHub Desktop.

Select an option

Save JoseRivas1998/fca72ee9c80c01b61353fcf812bc37cb to your computer and use it in GitHub Desktop.
I am the cube patterns iamthecu.be
function checkerBoard() {
cube.twist('MMEESS');
}
function wire() {
cube.twist('RLFB'.multiply(3));
cube.twist('RRBBLLRRBBLL');
}
function wireInverse() {
cube.twist('LLBBRRLLBBRR');
cube.twist('bflr'.multiply(3));
}
function cross() {
cube.twist('UFbLLUULLfBUULLU');
}
function crossInverse() {
cube.twist('ulluubFlluullBfu');
}
function cubeInCube() {
cube.twist('ulufRRbRFUbbUbLuFURf');
}
function cubeInCubeInverse() {
cube.twist('FrufUlBubbufrBrrFULU');
}
function sixSpots() {
cube.twist('ESes');
}
function sixSpotsInverse() {
cube.twist('SEse');
}
function facingCheckerboards() {
cube.twist('UUFFUUFFBBUUFFDD');
}
function facingCheckerboardsInverse() {
cube.twist('DDFFUUBBFFUUFFUU');
}
function verticalStripes() {
cube.twist('FUFRLLBdRDDLdBRRLFUF');
}
function zigzagCheckerboard() {
cube.twist('RRLLFFBBUFFBBUUFFBBU');
}
function scramble() {
var shuffles = Math.floor(Math.random() * (200 - 100 + 1)) + 100;
for(var i = 0; i < shuffles; i++) {
cube.shuffle();
}
}
function undoAlgorithm(algorithm) {
for(var i = 0; i < algorithm.length; i++) {
cube.undo();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment