π² Dice Game
A simple and interactive Dice Game built using pure HTML, CSS, and JavaScript where two players roll dice automatically on page refresh, with the winner determined instantly.
π Live Demo : https://surya62815.github.io/Dice-Game-HTML-CSS-JS/
β¨ Features
- π² Random dice roll for Player 1 and Player 2
- π Automatic play β runs on every page refresh
- π Instant results β displays winner or draw
- π¨ Clean UI β modern and responsive design
- β‘ Pure JavaScript β no external libraries or frameworks
π οΈ Technologies Used
- HTML β Page structure and semantics
- CSS β Styling and responsive layout
- JavaScript β Game logic and DOM manipulation
π§ How It Works
- JavaScript generates two random numbers (1β6)
- Dice images update dynamically based on the roll
- Playersβ scores are compared
- Winner or draw message is displayed instantly
π Learning Outcomes
- DOM manipulation with vanilla JavaScript
- Random number generation for game mechanics
- Dynamic HTML updates without page reloads
- Integration of HTML, CSS, and JavaScript
- Responsive design principles
π Project Structure
```text
Dice-Game-HTML-CSS-JS/
βββ index.html # Main HTML file
βββ styles.css # Styling and design
βββ index.js # Game logic and functionality
βββ images/ # Dice face images (1-6)
βββ dice1.png
βββ dice2.png
βββ dice3.png
βββ dice4.png
βββ dice5.png
βββ dice6.png