Skip to content

claudy-us/Pig-Dice-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

This is the Pig Dice Game. It's made using HTML/CSS/Javascript.

Description of the Game: The dice game Pig is played by taking turns rolling a die and adding the result to a player's turn total. Players can roll the die as many times as they want on their turn, but they must roll at least twice on their first roll. Players can choose to hold and score their turn total at any time, or they can continue rolling. If a player rolls a 1, their turn ends and they score nothing. If a player rolls a number other than 1, they add that number to their turn total and continue rolling. When a player chooses to hold, their turn total is added to their score and their turn ends. The first player to reach 100 points wins the game.

The only thing the code is still not doing so far is 'rolling at least twice on their first roll".

I took the basis of this code from another project, I can't find now, but as soon as I fing it I'll give the due credits.

The hardest part was to get the results, I had to ask Gemini and Pilot, they helped, but didn't give the right answer, I ended up figuring out the best approach to achieve it.

This is my first project, I am still learning this github. I have many other projects I'll post as soon as I have the time. Also the project is in a single file. But I'll make another version as soon as the code is more or less perfect for my taste and provide the js and css separate.

About

Pig Dice Game using HTML/CSS/Javascript/JQuery

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages