/Pig-Game

Python implementation of the Pig Dice Game.

Primary LanguagePythonMIT LicenseMIT

Pig-Game

Actions Status License: MIT Code style: black

Python implementation of the Pig Dice Game.

Table of contents

Rules

This is a dice game played to reach a target scoreof 100 points. Players take turns rolling a dice. If a player rolls a 1, they lose their points for that turn and then it's the next player's turn. Otherwise, they can keep rolling and adding points, or choose to hold and keep their accumulated points. The first player to reach or exceed the target score wins when they hold.

Installation

Clone the repository:

git clone https://github.com/SchwarzNikolas/Pig-Game.git

Go into the game's directory and use the make command to create a virtual python environment:

make venv

Enter the virtual environment:

  • For Unix and MacOS:
. .venv/bin/activate
  • For Windows:
. .venv/Scripts/activate

Install required libraries:

make install

Start the application:

make start

Usage

When the game is started, see all available commands:

help

Testing

Start the Unittests:

make coverage

To test the code structure run:

make lint

Documentation

All the documentation can be found in the doc folder.

License

MIT