I added the goals to the Yahtzee game.

Checkpoint 3:
My experience working with OOP is that I understand most of it but is still a little confusing.  I wasn't able to figure out all of the goals for the game.  This is different than how I would have written the program in units 1 and 2 as I would have just made a bunch of functions and called them throughout my code.  Now we can use classes.
This commit is contained in:
jwberent
2025-11-05 00:07:09 -05:00
parent fdcd5d5ae9
commit d856b055dc
2 changed files with 100 additions and 0 deletions

10
play.py
View File

@@ -3,12 +3,22 @@ from yahtzee_goals import (
GoalOnes,
GoalTwos,
GoalThrees,
GoalFours,
GoalFives,
GoalSixes,
GoalThreeofaKind,
GoalFourofaKind
)
goals = [
GoalOnes(),
GoalTwos(),
GoalThrees(),
GoalFours(),
GoalFives(),
GoalSixes(),
GoalThreeofaKind(),
GoalFourofaKind()
]
game = Yahtzee(goals)