GithubHelp home page GithubHelp logo

yannakode / dice-game-animation Goto Github PK

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

A simple dice game built with HTML, CSS and Javascript, with CSS animations. https://yannakode.github.io/dice-game-animation/

CSS 40.07% HTML 21.77% JavaScript 38.16%
css css-animations html html-css-javascript javascript js-games

dice-game-animation's Introduction

Virtual Dice Game

This is a simple virtual dice game implemented in JavaScript, HTML, and CSS. It allows two players to place their bets and roll a virtual dice to determine the winner. The game includes animations and sound effects to enhance the user experience.

Screenshot

Screenshot

How to Play

  1. Open the index.html file in your web browser.
  2. Enter a number in the "First player" input field to place your bet.
  3. Enter a number in the "Second player" input field to place the second player's bet.
  4. Click the "DRAW" button to roll the dice.
  5. The result of the game will be displayed below the dice.
    • If the rolled number matches neither player's bet, it will show "No hits" in red.
    • If the rolled number matches both players' bets, it will show "The game was tied." in yellow.
    • If the rolled number matches the first player's bet, it will show "Player 01 hits" in blue.
    • If the rolled number matches the second player's bet, it will show "Player 02 hits" in green.

Project Structure

The project consists of the following files:

  • index.html: The main HTML file that contains the game interface and structure.
  • css/style.css: The CSS file that defines the styles and animations for the game.
  • js/script.js: The JavaScript file that implements the game logic and event handling.
  • img/: Directory containing the dice images used in the game.
  • assets/dado-rolando.mp3: Sound effect file for the dice rolling animation.

Compatibility

The game should be compatible with modern web browsers that support HTML5, CSS3, and JavaScript.

Credits

This project was developed as part of the "JavaScript Course" course taught by "Edison Maia". The course covered JavaScript, HTML, and CSS concepts, and this project was one of the practical activities carried out during the course.

dice-game-animation's People

Contributors

yannakode avatar yannanobrega1414 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.