项目作者: danprzy
项目描述 :
Pig dice game in JavaScript
高级语言: JavaScript
项目地址: git://github.com/danprzy/Pig-game.git
Pig-game 🐷
Live Demo
You can play in your web browser
https://danprzy.github.io/Pig-game/
Technologies
- HTML5
- CSS3
- Vanilla JavaScript
General info
This is a simple game app created as part of Jonas Schmedtmann’s JavaScript course on Udemy.
This section of the course teaches about JavaScript DOM manipulation.
I’ve added my own customization to the game according to Jonas’s coding challenge. The HTML and CSS code involved in this project were pre-written by Mr. Schmedtmann.
Game rules
- The game has 2 players, playing in rounds.
- In each turn, a player rolls a dice as many times as he wishes. Each result get added to his ROUND score.
- BUT, if the player rolls a 1, all his ROUND score gets lost. After that, it’s the next player’s turn.
- The player can choose to ‘Hold’, which means that his ROUND score gets added to his GLBAL score. After that, it’s the next player’s turn.
- The first player to reach 100 points on GLOBAL score wins the game.