Created
December 27, 2014 00:38
-
-
Save cameronmaske/ba75641467478e1dba3b to your computer and use it in GitHub Desktop.
A script to call out twisters moves written in Python! Only works on OSX.
This file contains hidden or 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
from random import choice | |
from time import sleep | |
from subprocess import call | |
if __name__ == '__main__': | |
colors = ["green", "yellow", "blue", "red", "in the air", "other player's choice"] | |
parts = ["left hand", "right hand", "right foot", "left foot"] | |
while True: | |
part = choice(parts) | |
color = choice(colors) | |
sentance = '{} {}'.format(part, color) | |
print sentance | |
# Only works on OSX! | |
call(['say', sentance]) | |
sleep(7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment