Pig game Project with Javascript
Recently I am reviewing the Javascript with the course called The complete Javascript Course 2019:build real project from udemy. Online demo Keep up following the basic knowledge and projects from it. The final solution is the Pig game with two dices and two players. The rules: HTML: Two players panel with scores and current score. Three buttons for resetting the game,rolling the dices and holding the current players' score/ At the bottom is the Final scores for winners' reach point.Normally the rules' final score is 100. CSS: The backgound color and the dot are changing when switching the player,because of the classname active added. Set up the position of two dices and the bottom final-score style. Javascript: Initial the original setting in function init() The scores and current score are both "0".And the dices don't display at first place. If there is a winner last round,basically clear all the old records. ...