Created
February 8, 2017 02:05
-
-
Save connorjan/96eaea8870d82dfcd39f0e8fcfc28cf7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import random | |
faces = ["U","D","L","R","F","B"] | |
modifiers = ["", "'", "2"] | |
min_scramble_len = 16 | |
max_scramble_length = 20 | |
scramble = [] | |
for i in range(0,random.choice(range(min_scramble_len, max_scramble_length+1))): | |
sample = random.choice(faces) | |
while scramble and sample == scramble[i-1][0]: | |
sample = random.choice(faces) | |
mod = random.choice(modifiers) | |
scramble.append(sample+mod) | |
print " ".join(scramble) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment