This dice game was developed from an 'object oriented python' tutorial.
Run 'dbgame.py' to play the game.
It has a simple menu driven user interface that allows a single player to roll dice, reroll & score much like the UK version of 'Yahtzee'.
The dice object and D6 were created during the tutorial to provide a 6-sided dice object for use in dice games.
This creates a 'hand' object that holds 5 dice.
This places previously rolled dice into a hand and allows selected dice to be rerolled.
This evaluates a score for any given 'hand' or reroll hand.
This file interacts with all of those listed above plus 'yahtzee.db' to provide the full 1-player game.
- 'game.py' is a test game to check components are working - it doesn't keep the scores
- 'auto.py' is a simple experiment with automatic scoring and could be further developed as a 'computer' player
- 'yahtzee.db' is the sqlite database used to keep scores in 'dbgame.py'
- 'tests.py' contains units tests to check 'dice.py'