Code Monkey home page Code Monkey logo

pig-game's Introduction

pig-game

The Pig Game is a turn-based dice game where two players compete to reach a score of 100. Each player takes turns rolling a dice and accumulating points, but if they roll a 1, they lose their current points for that turn. The first player to reach the target score wins.

Table of Contents

Description

The Pig Game is a classic two-player dice game that combines luck and strategy. The objective is to be the first player to reach a score of 100. Players take turns rolling a six-sided dice and accumulating points based on the rolls. However, if a player rolls a 1, they lose their current turn's points, and the turn passes to the other player.

Features

  • Turn-Based Gameplay: Players take alternate turns to roll the dice.
  • Roll Dice: Roll a six-sided dice to accumulate points for the current turn.
  • Hold: Save and add the current turn's points to the total score.
  • Automatic Turn Switch: Turn switches to the other player if a 1 is rolled or the player chooses to hold.
  • Winning Condition: The first player to reach the target score (100) wins the game.

Installation

  1. Clone the repository:

    git clone https://jagathvm.github.io/pig-game/
    

Website

Check out this website : https://jagathvm.github.io/pig-game/

pig-game's People

Contributors

jagathvm avatar

Watchers

 avatar

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.