I was able to do the code of 4's, 5's, 6's, three of a kind, four of a kind, and yahtzee. The full house, straights, and chance hung me up.

I didnt mind writting classes for each problem, it was nice to think of one thing at a time instead of the whole checkpoint all together, which sometimes it has felt like that in the past. That being said, I like jupyter notebook the best still, adds more guidence which i feel I need.
This commit is contained in:
mollychi
2025-11-09 21:17:54 -05:00
parent 90c88b4385
commit f2c01b2c98
2 changed files with 165 additions and 0 deletions

20
play.py
View File

@@ -3,12 +3,32 @@ from yahtzee_goals import (
GoalOnes,
GoalTwos,
GoalThrees,
GoalFours,
GoalFives,
GoalSixes,
GoalFourofaKind,
GoalThreeofaKind,
GoalFullHouse,
GoalSmallStraight,
GoalLargeStraight,
GoalYahtzee,
GoalChance,
)
goals = [
GoalOnes(),
GoalTwos(),
GoalThrees(),
GoalFours(),
GoalFives(),
GoalSixes(),
GoalFourofaKind(),
GoalThreeofaKind(),
GoalFullHouse(),
GoalSmallStraight(),
GoalLargeStraight(),
GoalYahtzee(),
GoalChance(),
]
game = Yahtzee(goals)