def create_dice(): place_dice.delete("all") dices = [] for i in range(randint(1, 6)): dices.append(Dice()) points = [] for dice in dices: dice.draw() points.append(dice.get_points()) label_points["text"] = calculator.calc_zonk_combo(points)
def test_zonk_points_one(self): self.assertEqual(calculator.calc_zonk_combo([1]), 100)
def test_zonk_points_four_same_and_one_couple(self): self.assertEqual(calculator.calc_zonk_combo([1, 1, 1, 1, 2, 2]), 2000)
def test_zonk_points_fourth_fives_sixth_dice(self): self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 6, 6, 6]), 2400)
def test_zonk_points_all_different(self): self.assertEqual(calculator.calc_zonk_combo([2, 4, 5, 3, 1, 6]), 1500)
def test_zonk_points_three_couple(self): self.assertEqual(calculator.calc_zonk_combo([1, 1, 2, 2, 3, 3]), 750)
def test_zonk_points_set_of_three(self): self.assertEqual(calculator.calc_zonk_combo([2, 2, 2, 4, 6, 3]), 200)
def test_zonk_points_empty_dice(self): self.assertEqual(calculator.calc_zonk_combo([]), 0)
def test_zonk_points_set_of_three_and_ones(self): self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 1, 1, 7]), 800)
def test_zonk_points_double_set_of_three(self): self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 3, 3, 3]), 900)
def test_zonk_points_set_of_six(self): self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 6, 6, 6]), 2400)
def test_zonk_points_set_of_five(self): self.assertEqual(calculator.calc_zonk_combo([3, 3, 3, 3, 4, 3]), 900)
def test_zonk_points_set_of_four(self): self.assertEqual(calculator.calc_zonk_combo([2, 2, 2, 2, 4, 3]), 400)
def test_zonk_points_ones_and_fives_and_set_of_three(self): self.assertEqual(calculator.calc_zonk_combo([2, 2, 2, 1, 5, 3]), 350)
def test_zonk_points_five(self): self.assertEqual(calculator.calc_zonk_combo([5]), 50)
def test_zonk_points_no_combo(self): self.assertEqual(calculator.calc_zonk_combo([3, 4, 6, 7]), 0)
def test_zonk_points_set_of_six_2(self): self.assertEqual(calculator.calc_zonk_combo([1, 1, 1, 1, 1, 1]), 4000)
def test_zonk_points_ones_and_fives_2(self): self.assertEqual(calculator.calc_zonk_combo([1, 1, 3, 5, 2, 3]), 250)
def test_zonk_points_six_different(self): self.assertEqual(calculator.calc_zonk_combo([1, 2, 3, 4, 5, 6]), 1500)