Skip to content

Pig is a simple dice game. Players take turns to roll a single die as many times as they wish, adding all roll results to a running total, but losing their gained score for the turn if they roll a 1.

Notifications You must be signed in to change notification settings

sudo-ditto/pig-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pig Game

Table of contents

Description

Pig is a simple dice game first described in print by John Scarne in 1945. Players take turns to roll a single die as many times as they wish, adding all roll results to a running total, but losing their gained score for the turn if they roll a 1.

Play now

Play Pig Game now Pig Game Screenshot Pig Game Screenshot

Installation

  1. Clone repository - Go ahead and clone the repository.
  2. Install packages
    • npm install
  3. Run program
  4. Have fun!

About this game

I built this game for fun and to practice the MVC architecture. You can play the game, but keep in mind that the game is still in development and lacks some features.

Technologies

  • Stack

    1. Vanilla JS
    2. HMTL
    3. CSS
  • Methodologies

    1. MVC (Model-View-Controller) Architecture
    2. Model Bundling with parcel
    3. Older browser support
      • Regenerator runtime
      • Core-JS
    4. Responsive Design - Mobile friendly!

Features in progress:

  1. Play Again
  2. New Game

If you wish to play again you can reload the browser until the features are implemented.

Gameplay

  1. Roll Dice: Roll the dice as many times as you wish
    • Roll Dice will roll a random 6 sided dice. Each time you roll the dice score will be added to your current score (Unless you land 1).
    • If you land 1: Your current score will be nullified and the next player takes turn.
  2. Hold
    • Hold: Hold will add your current score to your total score. The current score will be nullified and then the next player takes turn.
  3. Winner
    • The game goes on until one of the players reaches 100 points.
    • You can choose to start the game again if you desire.
  4. New Game
    • Resets the game.

Author

  • Made with love by Loreta Krasteva ~

About

Pig is a simple dice game. Players take turns to roll a single die as many times as they wish, adding all roll results to a running total, but losing their gained score for the turn if they roll a 1.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published