Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pig game JS challenge #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Pig game JS challenge #3

wants to merge 8 commits into from

Conversation

Josie-N
Copy link
Owner

@Josie-N Josie-N commented Jul 19, 2019

Dice game where each player takes turns rolling a dice, accumulating points.

Screenshot 2019-09-29 at 21 47 10

@Josie-N Josie-N force-pushed the pig-game-JS-challenge branch from 4f2ecd9 to 2e2ccd8 Compare July 22, 2019 12:34
Josie-N added 4 commits July 22, 2019 14:50
The dice is now hidden when user first loads the page (display: none;).
Add an anonymous function inside addEventListener() method that creates the dice value, and then displays the correct png image depending on the value you get.
Reset the score to 0 when it's the next player's turn.
Styling: remove and then add the 'active' class to one player at a time. When it's their turn to roll the dice, they get the 'active' css class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant