Skip to content

Commit

Permalink
Added clockScrambler module, with scramblers for WCA, Jaap-, concise-…
Browse files Browse the repository at this point in the history
…, and efficient pin order notations.
  • Loading branch information
euphwes committed Feb 21, 2017
1 parent 3f49585 commit 810ca9c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ In `cuboidsScrambler` module:
- `get_3x3x6_scramble()` 3x3x6 cuboid scramble
- `get_3x3x7_scramble(n=40)` 3x3x7 cuboid scramble, where `n` is the length of the non-3x3 portion of the scramble

### Clock
In `clockScrambler` module:

- `get_WCA_scramble()` Clock scramble (WCA notation)
- `get_Jaap_scramble()` Clock scramble (Jaap notation)
- `get_concise_scramble()` Clock scramble (concise notation)
- `get_efficient_pin_order_scramble()` Clock scramble (efficient pin order notation)

### Big cubes
In `bigCubesScrambler` module:

Expand Down
23 changes: 23 additions & 0 deletions pyTwistyScrambler/clockScrambler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from . import _UTIL_SCRAMBLER, trim

#------------------------------------------------------------------------------

@trim
def get_WCA_scramble():
""" Gets a WCA scramble for a Rubik's Clock. """
return _UTIL_SCRAMBLER.call("util_scramble.getClockWCAScramble")

@trim
def get_Jaap_scramble():
""" Gets a Jaap-notation scramble for a Rubik's Clock. """
return _UTIL_SCRAMBLER.call("util_scramble.getClockJaapScramble")

@trim
def get_concise_scramble():
""" Gets a concise-notation scramble for a Rubik's Clock. """
return _UTIL_SCRAMBLER.call("util_scramble.getClockConciseScramble")

@trim
def get_efficient_pin_order_scramble():
""" Gets an efficient pin order scramble for a Rubik's Clock. """
return _UTIL_SCRAMBLER.call("util_scramble.getClockEfficientPinOrderScramble")
17 changes: 17 additions & 0 deletions pyTwistyScrambler/js_resources/utilscramble.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,18 @@ var util_scramble = (function(rn, rndEl, mega) {
function getMegaminxOldStyleScramble(n){
return utilscramble("mgmo", n);
}
function getClockWCAScramble(){
return utilscramble("clkwca", 0);
}
function getClockJaapScramble(){
return utilscramble("clk", 0);
}
function getClockConciseScramble(){
return utilscramble("clkc", 0);
}
function getClockEfficientPinOrderScramble(){
return utilscramble("clke", 0);
}
function getSquareOneTurnMetricScramble(n){
return sq1_scramble(1, n);
}
Expand All @@ -466,6 +478,11 @@ var util_scramble = (function(rn, rndEl, mega) {
getMegaminxOldStyleScramble: getMegaminxOldStyleScramble,
getSquareOneTurnMetricScramble: getSquareOneTurnMetricScramble,
getSquareOneTwistMetricScramble: getSquareOneTwistMetricScramble,

getClockWCAScramble: getClockWCAScramble,
getClockJaapScramble: getClockJaapScramble,
getClockConciseScramble: getClockConciseScramble,
getClockEfficientPinOrderScramble: getClockEfficientPinOrderScramble,
}


Expand Down

0 comments on commit 810ca9c

Please sign in to comment.