Check point 1

since we are doing this with dice, I think we could also use it to
simulate a deck of cards which could be useful for a game.
This commit is contained in:
Lauren Dawnkaski 2024-11-30 01:12:21 -05:00
parent f4bd21adaa
commit 42f81863d7
1 changed files with 13 additions and 0 deletions

View File

@ -18,6 +18,19 @@ class FiveDice:
if face != 1:
return False
return True
def is_three_of_a_kind(self):
for face in self.faces():
if self.faces().count(face) >= 3:
return True
return False
def is_four_of_a_kind(self):
for face in self.faces():
if self.faces().count(face) >= 4:
return True
return False
dice = FiveDice()
successes = 0