This webpage contains a two-players dice game can be played on both desktop and mobile devices, with images resizing appropriately for smaller screens. This code is for a two-player dice game. The game begins by randomly selecting a player to start. Each player rolls a dice by clicking a button, and the result of the dice roll is added to their total score. The dice image updates to reflect the result of the dice roll. After each roll, the active player switches, disabling the button of the player who just rolled and enabling the other player’s button. If a player’s total score reaches or exceeds 30, they are declared the winner, and an alert is displayed. Both roll buttons are then disabled. There’s also a reset function that resets both players’ scores to 0, randomly selects a player to start the next game, and enables their button. The game can be played on both desktop and mobile devices, with images resizing appropriately for smaller screens.
-
Notifications
You must be signed in to change notification settings - Fork 0
This webpage contains a two-players dice game can be played on both desktop and mobile devices, with images resizing appropriately for smaller screens.
prasanth2817/Dice-Game-design
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
This webpage contains a two-players dice game can be played on both desktop and mobile devices, with images resizing appropriately for smaller screens.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published