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