Simplify goals interface, remove .

This commit is contained in:
Chris Proctor
2024-11-10 14:10:35 -05:00
parent 88b65f75a9
commit 1d97a0df20
3 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
from die import Die
class Yachtzee:
class Yahtzee:
"""A command-line Yahtzee game.
This version of Yahtzee is initialized with a list of goals.
"""
@@ -11,6 +11,9 @@ class Yachtzee:
def play(self):
print("Welcome to Yachtzee!")
self.score = 0
for goal in self.goals:
goal.used = False
while self.count_unused_goals() > 0:
self.play_round()
print(f"Your final score was {self.score}")