Created
December 24, 2011 14:05
-
-
Save martinthenext/1517394 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
# -*- coding: utf8 -*- | |
import random | |
class Game(object): | |
def __init__(self): | |
self.options = [ | |
'7 - counts', | |
'9 - theme', | |
'10 - question', | |
'J - condition', | |
'Q - hands up', | |
'K - drink yourself', | |
'A - choose one to drink' | |
] | |
self.used = dict() | |
for x in self.options: | |
self.used[x] = 0 | |
def do(self): | |
choice = random.choice(self.options) | |
if self.used[choice] < 4: | |
self.used[choice] += 1 | |
print choice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment