Files
lab_dice/play.py
mollychi f2c01b2c98 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.
2025-11-09 21:17:54 -05:00

36 lines
595 B
Python

from yahtzee import Yahtzee
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)
game.play()