Code Monkey home page Code Monkey logo

dice-game-pig-'s Introduction

๐Ÿท PIG dice game

๐ŸŽฒ About the game

  • PIG is a simple dice game with two players (Computervs. Human or Human vs. Human).
  • Each player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold".
  • The player who first scores 100 or more points wins

๐Ÿ“– Game rules:

  • The objective of the game is to be the first player to reach 100 points.
  • On each turn, the player rolls a six-sided die.
  • If the player rolls a 1, their turn ends and they receive no points.
  • If the player rolls any other number, they can choose to roll again or hold to keep score.
  • If a player chooses to hold their turn, total is added to their score.
  • If the player chooses to play against the computer, the player should choose Game difficulty which will reflect the inteliigence of the computer player.
  • The player may choose from two options, 1 for easy mode and 2 for hard mode.
  • If the player decided to play in easy mode, the computer will stop rolling when it reaches score of 15 in that round or it rolls a 1 and that round score will be 0.
  • If the player decided to play in hard mode, the computer will stop rolling when it reaches score of 25 in that round or it rolls a 1 and that round score will be 0.

๐Ÿ About the project

๐Ÿ“ The assignment

This is assignment two of Methods for Sustainable Programming course DA115B.
The project is created and maintained by Ahmed Radwan and Sam El Saati.
Programming Language used: Python.

โš ๏ธ Known issues

1- We prioritized flake8, pylint, unit testing and coverage to meet the deadline.
2- We could not generate uml diagrams automatically using pyreverse.
3- We used longer functions in our main classes since we started without knowing about TDD.

๐Ÿ™ To respect the given deadline:

We decided not to test (game.py, main.py) as they are our main classes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.