Skip to content

AslDeveloper07/dice-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎲 Two-Player Dice Game

This is a simple and interactive two-player dice game built using HTML, CSS, and JavaScript. It was developed as a homework assignment during a JavaScript learning course.

📝 Game Description

  • The game is played between two players.
  • Each player takes turns rolling the dice as many times as they wish during their turn.
  • The rolled value gets added to the current score.
  • At any moment, the player can choose to hold (save) their current score, which adds it to their total score and passes the turn to the other player.
  • If a player rolls a 1, their current score is lost and the turn passes to the opponent.
  • The first player to reach 40 points or more is declared the winner.

✨ Features

  • 🎮 Turn-based gameplay for 2 players
  • 🎲 Dice rolling with random numbers (1–6)
  • 💾 Score saving and accumulation
  • 🔄 Switching turns automatically
  • 🏆 Winning condition: first to 40 points
  • 🎨 Simple and responsive UI

🛠 Technologies Used

  • HTML5 – Basic page structure
  • CSS3 – Styling and layout
  • JavaScript (Vanilla) – Game logic, dice roll, score tracking, and UI updates

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published