The purpose of the project is to learn how to collabrate in a team and exercise writing clean and testable code.
git clone https://github.com/idontreallywolf/pigdice-py
cd pigdice-py
make venv
.venv/Scripts/activate
source .venv/bin/activate
make install
Best performance in PowerShell or Unix Terminal
make run
make test
make pylint
make flake8
.. or both pylint and flake8:
make lint
make unittest
make coverage-report
make pdoc
make pyreverse
make metrics
The game offers five options: exit, help, highscore, rules, and start
The exit
option closes the application, help
provides inforamtion on commands, highscore
displays the high score table, rules
provides the rules of the game, and start
begins the game.
Options | Description |
---|---|
Hold | Save the turn socre to total score |
Roll | Roll the dice |
Cheat | Win the game |
End Game | |
Change Name | Change the current player's name |
Each turn, a player repeatedly rolls a dice until either a 1 is rolled or the player decides to "hold":
- If the player rolls a 1, they score nothing and it becomes the next player's turn.
- If the player rolls any other number, it is added to their turn total and the player's turn continues.
- If a player chooses to "hold", their turn total is added to their score, and it becomes the next player's turn.
The first player to score 100 or more points wins. Wikipedia (Pig dice game)
The AI player will choose to roll as long as it's current score is less than threshold score.
The project was created by Beilan Guo and Nedim Kanat, who attended the "Methods for Sustainable Programming" course at Kristianstad University.