GithubHelp home page GithubHelp logo

umar8637 / dice-game-through-html-css-javascript Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 57 KB

Dice-Game-through-HTML-CSS-Javascript

Home Page: https://umar8637.github.io/Dice-Game-through-HTML-CSS-Javascript/

CSS 23.70% JavaScript 41.52% HTML 34.78%

dice-game-through-html-css-javascript's Introduction

Dice Game

This is a simple web-based dice game project. The game allows you to roll virtual dice and displays a random dice face each time you click the "Roll the dice" button.

Usage

To use the Dice Game, follow these steps:

  1. Clone the repository to your local machine.
  2. Open the index.html file in your web browser.

Requirements

The Dice Game project has the following requirements:

  • HTML5 compatible web browser.

Files

The project repository contains the following files:

  • index.html: The main HTML file that displays the game interface.
  • dice_game.css: The CSS file that styles the game interface.
  • dice_game.js: The JavaScript file that handles the game logic.
  • Images/: A directory containing the dice face images used in the game.
  • dice_sound.mp3: An audio file that plays when the dice is rolled.

How It Works

The index.html file contains the structure of the game interface, including the dice images and the roll button. The CSS file dice_game.css provides the styling for the interface.

The game logic is implemented in the JavaScript file dice_game.js. When the page loads, the script hides all dice images except the first one. When the roll button is clicked, a random dice face is selected, and only that face is displayed while hiding the rest. Additionally, a dice rolling sound is played.

dice-game-through-html-css-javascript's People

Contributors

umar8637 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.