[They] own the name “Cards Against Humanity,” so [we] have to call [our] crappy thing something else.; encoding errors in questions
This commit is contained in:
parent
144f439f1b
commit
6006fc0dd0
|
|
@ -48,7 +48,7 @@ What ended my last relationship?
|
|||
What's that sound?
|
||||
__________. That's how I want to die.
|
||||
Why am I sticky?
|
||||
What's the next Happy Meal® toy?
|
||||
What's the next Happy Meal® toy?
|
||||
What's there a ton of in heaven?
|
||||
I do not know with what weapons World War III will be fought, but World War IV will be fought with __________.
|
||||
What will always get you laid?
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ In a world ravaged by __________, our only solace is __________.
|
|||
In M. Night Shyamalan's new movie, Bruce Willis discovers that __________ had really been __________ all along.
|
||||
I never truly understood __________ until I encountered __________.
|
||||
Rumor has it that Vladimir Putin's favorite dish is __________ stuffed with __________.
|
||||
Lifetime® presents __________, the story of __________.
|
||||
Lifetime® presents __________, the story of __________.
|
||||
What's the next superhero/sidekick duo?
|
||||
|
|
@ -10,7 +10,7 @@ question_cards_file_name = ['question_cards', 'question_cards1', 'question_cards
|
|||
base_directory = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
|
||||
class CardsAgainstHumanity(object):
|
||||
class Deck(object):
|
||||
def __init__(self):
|
||||
self.answerDb = self.parse_card_file('answer')
|
||||
self.questionDb = self.parse_card_file('question')
|
||||
|
|
@ -54,7 +54,7 @@ class Card(object):
|
|||
self.type = type
|
||||
self.text = text
|
||||
|
||||
class GameRound(CardsAgainstHumanity):
|
||||
class GameRound(object):
|
||||
def __init__(self):
|
||||
self.playerOne = str(raw_input('Player 1 Name: '))
|
||||
self.playerTwo = str(raw_input('Player 2 Name: '))
|
||||
|
|
@ -104,7 +104,7 @@ class PlayerHand(object):
|
|||
|
||||
|
||||
if __name__=="__main__":
|
||||
deck = CardsAgainstHumanity()
|
||||
deck = Deck()
|
||||
print 'Current Question: %s' % deck.drawCard('question').text
|
||||
jazz_hand = PlayerHand(deck)
|
||||
bear_hand = PlayerHand(deck)
|
||||
|
|
|
|||
4
test.py
4
test.py
|
|
@ -6,13 +6,13 @@ def test_cards_will_be_unique():
|
|||
"""
|
||||
Ensure that when a hand is created the proper cards are removed from the deck.
|
||||
"""
|
||||
deck=CardsAgainstHumanity()
|
||||
deck=Deck()
|
||||
hand_one = PlayerHand(deck)
|
||||
for card in hand_one.cardList:
|
||||
assert card.text not in deck.answerDb
|
||||
|
||||
def test_card_parsing():
|
||||
deck = CardsAgainstHumanity()
|
||||
deck = Deck()
|
||||
for card in deck.answerDb:
|
||||
assert type(card) is Card
|
||||
assert type(card.id) is int
|
||||
|
|
|
|||
Loading…
Reference in New Issue