Exemplo n.º 1
0
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)
Exemplo n.º 2
0
	def test_zonk_points_one(self):
		self.assertEqual(calculator.calc_zonk_combo([1]), 100)
Exemplo n.º 3
0
	def test_zonk_points_four_same_and_one_couple(self):
		self.assertEqual(calculator.calc_zonk_combo([1, 1, 1, 1, 2, 2]), 2000)
Exemplo n.º 4
0
	def test_zonk_points_fourth_fives_sixth_dice(self):
		self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 6, 6, 6]), 2400)
Exemplo n.º 5
0
	def test_zonk_points_all_different(self):
		self.assertEqual(calculator.calc_zonk_combo([2, 4, 5, 3, 1, 6]), 1500)
Exemplo n.º 6
0
	def test_zonk_points_three_couple(self):
		self.assertEqual(calculator.calc_zonk_combo([1, 1, 2, 2, 3, 3]), 750)
Exemplo n.º 7
0
	def test_zonk_points_set_of_three(self):
		self.assertEqual(calculator.calc_zonk_combo([2, 2, 2, 4, 6, 3]), 200)
Exemplo n.º 8
0
	def test_zonk_points_empty_dice(self):
		self.assertEqual(calculator.calc_zonk_combo([]), 0)
Exemplo n.º 9
0
	def test_zonk_points_set_of_three_and_ones(self):
		self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 1, 1, 7]), 800)
Exemplo n.º 10
0
	def test_zonk_points_double_set_of_three(self):
		self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 3, 3, 3]), 900)
Exemplo n.º 11
0
	def test_zonk_points_set_of_six(self):
		self.assertEqual(calculator.calc_zonk_combo([6, 6, 6, 6, 6, 6]), 2400)
Exemplo n.º 12
0
	def test_zonk_points_set_of_five(self):
		self.assertEqual(calculator.calc_zonk_combo([3, 3, 3, 3, 4, 3]), 900)
Exemplo n.º 13
0
	def test_zonk_points_set_of_four(self):
		self.assertEqual(calculator.calc_zonk_combo([2, 2, 2, 2, 4, 3]), 400)
Exemplo n.º 14
0
	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)
Exemplo n.º 15
0
	def test_zonk_points_five(self):
		self.assertEqual(calculator.calc_zonk_combo([5]), 50)
Exemplo n.º 16
0
	def test_zonk_points_no_combo(self):
		self.assertEqual(calculator.calc_zonk_combo([3, 4, 6, 7]), 0)
Exemplo n.º 17
0
	def test_zonk_points_set_of_six_2(self):
		self.assertEqual(calculator.calc_zonk_combo([1, 1, 1, 1, 1, 1]), 4000)
Exemplo n.º 18
0
	def test_zonk_points_ones_and_fives_2(self):
		self.assertEqual(calculator.calc_zonk_combo([1, 1, 3, 5, 2, 3]), 250)
Exemplo n.º 19
0
	def test_zonk_points_six_different(self):
		self.assertEqual(calculator.calc_zonk_combo([1, 2, 3, 4, 5, 6]), 1500)