/dice-game

Dice game with two players. Built as an exercise for HTML, CSS and JS practicing.

Primary LanguageJavaScript

Dice game

This is a dice game I built as an exercise to practice JS functions and adding animations to websites in the beggining of my study in web development.

I started from an exercise proposed by the course "The Complete 2023 Web Development Bootcamp" and added some functionalities like the dice animation and the "Throw dice!" button.

Overview

The project

This is a dice game. Upon button click, two dice are rolled, the first for player 1 and the second for player 2. When both dice are shown, the page tells the game result: either a draw or a victory for player 1 or player 2.

Preview

Desktop

gif of project being displayed and used on desktop

Link

My process

Built with 👩🏽‍💻

  • HTML 5;
  • CSS 3;
  • JS.

What I practiced 💪🏽

  • Manipulating HTML element attributes using JS;
  • Generation random numbers using JS;
  • Using JS setTimeout function for building animations;
  • Using CSS transform and transition.