The dice game, pig!
Pig
The classic dice game, Pig! If you roll two sixes in a row, your entire score is reset! This was something I created during an online course on Udemy. CSS and HTML was provided by the instructor.
A small section of the JS in this project:
if (dice1 === 6 || dice2 === 6 && lastDice === 6) {
//Player loses score
scores[activePlayer] = 0;
document.querySelector('#score-' + activePlayer).textContent = '0';
nextPlayer();
}
`
To-do list:
Project is: In progress due to potential improvements
Amy Scott