Merge pull request #1 from Bearcode/master

A few fixes
This commit is contained in:
Jazzahn 2012-12-06 15:45:16 -08:00
commit 130fa129a4
1 changed files with 12 additions and 11 deletions

View File

@ -1,16 +1,17 @@
from random import choice
class CardsAgainstHumanity:
class CardsAgainstHumanity(object):
def __init__(self):
self.answerDb = ["Coat hanger abortions", "Man meat", "Autocannibalism", "Vigorous jazz hands", "Flightless birds", "Pictures of boobs", "Doing the right thing", "Hunting accidents", "A cartoon camel enjoying the smooth", "The violation of our most basic human rights", "Viagra", "Self-loathing", "Spectacular abs", "An honest cop with nothing left to lose", "Abstinence", "A balanced breakfast", "Mountain Dew Code Red", "Concealing a boner", "Roofies", "Tweeting"]
__init__(self)
self.answerDb = ["Coat hanger abortions", "Man meat", "Autocannibalism", "Vigorous jazz hands", "Flightless birds", "Pictures of boobs", "Doing the right thing", "Hunting accidents", "A cartoon camel enjoying the smooth", "The violation of our most basic human rights", "Viagra", "Self-loathing", "Spectacular abs", "An honest cop with nothing left to lose", "Abstinence", "A balanced breakfast", "Mountain Dew Code Red", "Concealing a boner", "Roofies", "Tweeting"]
def drawCard(self):
hand = []
while len(hand) < 5:
answerCard = choice(self.answerDb)
hand.append(answerCard)
self.answerDb.remove(answerCard)
return hand
def drawCard(self):
hand = []
while len(hand) < 5:
answerCard = choice(self.answerDb)
hand.append(answerCard)
self.answerDb.remove(answerCard)
return hand
cah = CardsAgainstHumanity()
print drawCard()
print cah.drawCard()