This is a command-line interface (CLI) implementation of the popular dice game Liar's Dice written in Python. Players take turns bidding on the number of dice with a specific face value, or challenging the previous bid. The game continues until only one player remains.
- Each player starts with a set number of dice (2).
- On each player's turn, one can:
- Make a Bid: Bid a higher number or value of dice than the last bid.
- Challenge: If a player believes the last bid is incorrect, he can challenge. All the dice are revealed and the challenger wins if there are fewer dice than bid and loses otherwise. Loser of a challenge discards one die.
- If a player loses all of his dice, he is out of the game.
- The game ends when only one player has any die remaining.
- Wild ones: if turned on, dice with the value of 1 count as wild (any value).
- Clone the repository:
git clone https://bitbucket.org:zanvd/liars-dice.git
- Navigate to the project's root:
cd liars-dice
- Run the game:
python -m liars_dice.main
- Bid: Enter a die face (1-6) and the quantity of dice you believe are present in the game.
- Challenge: Challenge previous player's bid.
- Python 3.x
Execute:
python -m unittest discover -s tests/
This project is licensed under the MIT License.