Git Product home page Git Product logo

the-dice-game's Introduction

Dice Game

This is a simple JavaScript-based dice game for two players. In this game, You can roll a virtual dice by refreshing the site, and the player with the higher roll wins. If both players roll the same number, it's a draw.

Table of Contents

Getting Started

To get started with this game, follow these instructions:

  1. Clone or download the repository to your local machine.

  2. Open the index.html file in your web browser.

  3. You will see two dice images on the screen, and the result of the game will be displayed as "Player 1 Wins," "Player 2 Wins," or "Draw!" depending on the outcome of the dice rolls.

How to Play

  1. Click the Refresh button to start the game.

  2. Two dice images will appear on the screen, each showing a random number between 1 and 6.

  3. The player with the higher number wins. If both players roll the same number, it's a draw.

  4. The result of the game will be displayed at the top of the screen in the form of a message, such as "🚩Player 1 Wins," "🚩Player 2 Wins," or "Draw!"

This is made as a part of my full stack web developer journey by accessing Angela yu's course in Udemy

the-dice-game's People

Contributors

abnas7511 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.