Skip to content

Instantly share code, notes, and snippets.

@SwampDragons
Last active May 20, 2017 21:09
Show Gist options
  • Save SwampDragons/79205a8b09c6c0694f3d7fbb1358e051 to your computer and use it in GitHub Desktop.
Save SwampDragons/79205a8b09c6c0694f3d7fbb1358e051 to your computer and use it in GitHub Desktop.
some tools for building your simon says command line game.
import random
import time
random.seed()
SLEEP_TIME = 2
def clear_screen():
print(chr(27) + "[2J")
turn_number = 1
colors = ["red", "yellow", "green", "blue"]
while True:
# blah blah blah
color = random.choice(colors)
time.sleep(SLEEP_TIME)
user_input = input("what colors?")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment