Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fyzanshaik/dice-game

A simple Javascript Dice game for 2 players.
https://github.com/fyzanshaik/dice-game

Last synced: about 5 hours ago
JSON representation

A simple Javascript Dice game for 2 players.

Awesome Lists containing this project

README

        

# JavaScript Dice Game

This is a simple dice game built with HTML, CSS, and JavaScript. It allows two players to roll dice and displays the result on the screen. The player with the higher number wins the game.

## Game Instructions

1. Open the `index.html` file in a web browser.
2. The game will display two dice values for Player 1 and Player 2.
3. Click the "Refresh" button or refresh the page to roll the dice and determine the winner.
4. The dice values will update with the corresponding numbers rolled by each player.
5. The result will be displayed below the dice values, indicating the winner.

## Technologies Used

- HTML
- CSS
- JavaScript

## Project Structure

The project consists of the following files:

- `index.html`: The HTML file containing the structure and layout of the game.
- `style.css`: The CSS file that defines the styles and appearance of the game.
- `index.js`: The JavaScript file that implements the game logic and dice rolling functionality.

## Development

To make changes or contribute to the project, follow these steps:

1. Clone the repository: `git clone https://github.com/your-username/dice-game.git`
2. Navigate to the project directory: `cd dice-game`
3. Make changes using your preferred code editor.
4. Open `index.html` in a web browser to test the game.
5. Commit your changes: `git commit -m "Add feature or fix"`
6. Push to the repository: `git push`

Feel free to customize the game further by modifying the HTML, CSS, and JavaScript code.

## License

This project is licensed under the [MIT License](LICENSE).