تفاصيل العمل

Project Name: Dice Game – Two Player Turn-Based Game

Technologies Used: HTML, CSS, JavaScript

️ Project Type: Game Development (Vanilla JS)

? Description:

This is a classic two-player dice game built using HTML, CSS, and JavaScript. The game involves two players who take turns rolling a dice and accumulating points. The twist: if a player rolls a 1, their current score resets and the turn switches to the other player!

Game Rules:

Players take turns rolling a dice.

Each dice roll adds the number to the current score.

If the player rolls a 1, their current score resets and the turn ends.

Players can click “Hold” to add their current score to the total and pass the turn.

The first player to reach the winning score (e.g., 100) wins the game.

The “New Game” button resets everything for a fresh start.

Key Features:

Turn-based logic with real-time score updates

Dice roll functionality with randomization

Dynamic UI feedback for active player and current score

Simple yet elegant UI with gradient backgrounds and animations

Modular, clean JavaScript code structure

Learning Outcome:

Built to practice core JavaScript concepts like functions, event handling, conditional statements, and DOM manipulation in a game context.

بطاقة العمل

اسم المستقل
عدد الإعجابات
0
تاريخ الإضافة
تاريخ الإنجاز
المهارات