Skip to content

Instantly share code, notes, and snippets.

@danverbraganza
Created February 7, 2016 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danverbraganza/8447acc70ad08c92d4fd to your computer and use it in GitHub Desktop.
Save danverbraganza/8447acc70ad08c92d4fd to your computer and use it in GitHub Desktop.
c,g,s,m,l,p=''.join(x for x in __import__('random').choice(list(open('/usr/share/dict/words'))).upper() if x.isalpha()),set(),'|===\n| |\n|{3} {0} {5}\n| {2}{1}{4}\n| {6} {7}\n| {8} {9}'.format,list(r'QT-\-//\||'),10,' '
while not all(q in g for q in c) and l:_,l=[g.add(x) for x in raw_input('%s %s left\n%s\n%s:'%(p.join(sorted(g)),l,s(*(m[:-l]+[p]*l)),p.join(q if q in g else '_' for q in c))).upper() if x.isalpha()],max(10-len(g-set(c)),0)
print 'You',['win!','lose!\n'+s(*m)][not l],'\nWord was',c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment