Skip to content

Imane-ux/YaTzi-Web-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YaTzI Game

Description:

Yahtzy is a classic dice game where the player aims to score points by rolling combinations of five dice. This repository contains the code for a web-based single-player Yahtzy game.

How to Play

Clone the Repository

git clone https://github.com/Imane-ux/YaTzi-Web-Game.git

cd YaTzi-Web-Game

Run the Game:

If you're not using XAMPP:
1. You can open new terminal at project folder and run command line: php -S localhost:8000
    --> Make sure to have php installed on your mac.

2. Open this link http://localhost:8000 on your web browser.

Game Instructions

-Rolling the Dice:

Click on the "Roll Dice" button to roll all five dice. You can roll the dice up to two times per turn. After the first roll, you can choose which dice to keep by clicking on them.

-Selecting Dice:

Click on a die to toggle between keeping and re-rolling it. After your second roll or if you decide to keep certain dice, click the "Roll Dice" button again to finalize your turn.

-Scoring:

After rolling the dice, you can choose where to score your points based on the combinations available (e.g., Ones, Twos, Threes, etc.). Click on the corresponding score cell in the score table to enter your score for that category.

-Game End:

The game ends when all score categories are filled for both upper and lower sections. The final score is calculated and displayed, along with the leaderboard of your top 10 scores, at the end of each round played.

Screenshots

Initial game interface with dice and score table.

Screenshot 2024-06-19 at 8 20 33 PM

Scoring table after first roll

image

Re-Roll button disabled after 2 rolls until user enters score

image

End game state after entering all 15 rows

image

Leaderboard popup with player's total score and top 10 scores achieved

image

Technologies Used: HTML, CSS, JavaScript & php

Technical outline of project can be found in our Portfolio projects section from Assignment 1.