generated from mwc/lab_dice
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.
36 lines
595 B
Python
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()
|