HUB
Sign inSign up

amnoorbrar/dice-roller

By amnoorbrar

โ€ขUpdated 12 months ago

Image
0

400

amnoorbrar/dice-roller repository overview

โ Dice Roller

A lightweight, web-based application for rolling multiple six-sided dice. Built with pure HTML, CSS, and JavaScript, it provides a simple and visual way to generate random numbersโ€”perfect for board games, tabletop RPGs, or decision-making.

โ โœจ Features

  • Roll Multiple Dice: Enter any number to roll that many dice at once.
  • Visual & Numerical Results: See the results as both a list of numbers and images of dice faces.
  • Clean and Responsive UI: A centered, user-friendly interface that works well on both desktop and mobile browsers.
  • Self-Contained: The entire application runs in the browser with no external dependencies.

โ ๐Ÿš€ Quick Start

Getting the Dice Roller up and running is simple with Docker.

  1. Pull the Docker image:
    docker pull amnoorbrar/dice-roller
    
  2. Run the container:
    docker run -d -p 8080:80 amnoorbrar/dice-roller
    
  3. Open your browser and navigate to http://localhost:8080.

โ ๐ŸŽฎ How to Use

  1. On the web page, enter the number of dice you want to roll in the input field.
  2. Click the "Roll Dice" button.
  3. View the results below:
    • The "Dice Result" line shows the numerical values.
    • The dice images provide a visual representation of the roll.

โ ๐Ÿ› ๏ธ Technical Details

This is a static web application served from a Docker container. The project structure is straightforward:

dice-roller/
โ”œโ”€โ”€ index.html          # The main application page
โ”œโ”€โ”€ test-web.js         # Contains the dice-rolling logic
โ”œโ”€โ”€ style/
โ”‚   โ””โ”€โ”€ style.css       # All the styling for the page
โ””โ”€โ”€ dice_images/        # Folder containing images for dice faces (1-6)
    โ”œโ”€โ”€ 1.png
    โ”œโ”€โ”€ 2.png
    โ”œโ”€โ”€ 3.png
    โ”œโ”€โ”€ 4.png
    โ”œโ”€โ”€ 5.png
    โ””โ”€โ”€ 6.png

This project emphasizes simplicity and ease of use, requiring only a Docker container to run without complex dependencies.

Tag summary

Content type

Image

Digest

sha256:2e9a79fa8โ€ฆ

Size

4.6 MB

Last updated

12 months ago

docker pull amnoorbrar/dice-roller