예제 #1
0
 def test_asking_sports_question_decreases_question_list(self):
     game = Game(2)
     game.add('Chet')  # rename to addPlayer?
     game.shuffle_questions()
     sports_location = 2
     game.roll(sports_location)
     self.assertEqual(1, len(game.sports_questions), "Sports")
예제 #2
0
 def test_asking_rock_question_decreases_question_list(self):
     game = Game(2)
     game.add('Chet')  # rename to addPlayer?
     game.shuffle_questions()
     rock_location = 3
     game.roll(rock_location)
     self.assertEqual(1, len(game.rock_questions), "Rock")
예제 #3
0
 def test_asking_pop_question_decreases_question_list(self):
     game = Game(2)
     game.add('Chet')  # rename to addPlayer?
     game.shuffle_questions()
     pop_location = 0
     game.roll(pop_location)
     self.assertEqual(1, len(game.pop_questions), "Pop")
예제 #4
0
    def test_asking_more_rock_questions_than_are_in_category_resets_the_rock_questions_in_that_category(self):
        game = Game(2)
        game.add('Chet')  # rename to addPlayer?
        game.shuffle_questions()
        rock_location = 3
        game.roll(rock_location)
        number_of_categories = 4
        game.roll(number_of_categories)
        self.assertEqual(0, len(game.rock_questions), "Rock")

        game.roll(number_of_categories)
        self.assertEqual(1, len(game.rock_questions), "Rock")