Simplify goals interface, remove .
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user