commit
130fa129a4
23
plugin.py
23
plugin.py
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue