Skip to content

Ali-Sdg90/React-Dice-Distribution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-Dice-Distribution🎲


app-showcase

Overview

React-Dice-Distribution is a visually appealing web application built with React that showcases dice distribution in a graphical form. The app includes a control panel where users can manipulate the number of dice (ranging from 2 to 30), the delay between each dice deployment, and the number of times the dice are thrown in a single step. The user can set these parameters and initiate the dice rolling process by clicking the "Start" button. The sums of the dice numbers are then displayed on a responsive chart.

The chart, implemented using the ApexCharts library, provides an immersive experience with features such as zoom, responsiveness, smooth animations, and transitions. Additionally, the chart offers export options, allowing users to save it in SVG, PNG, or CSV formats.

The application's meticulous attention to detail and high level of craftsmanship is evident. It has been designed to ensure a seamless user experience on devices of varying sizes, thanks to a custom responsive design that includes scaling and rotation capabilities. You can access the app on GitHub Pages using the following link: React-Dice-Distribution.

The chart visualizes the data in a line format, displaying the line of all accumulated dice sums. This representation facilitates the identification of a normal distribution or bell curve. The dark theme employed in the app contributes to enhanced readability and reduced eye strain.

Features

  • Dynamic control panel to adjust the number of dice, delay between deployments, and steps.
  • Responsive chart with zooming functionality and export options (SVG, PNG, CSV).
  • Smooth animations and transitions for an enhanced visualization experience.
  • Custom responsive design for optimal usage on different devices.
  • Dark theme for improved visual comfort.

Infinit-Mode

Installation

To run React-Dice-Distribution locally on your machine, follow these steps:

  1. Clone the repository:
git clone https://github.com/ali-sdg90/React-Dice-Distribution.git
  1. Navigate to the project directory:
cd React-Dice-Distribution
  1. Install the dependencies:
npm install
  1. Start the development server:
 npm start
  1. Open your web browser and visit http://localhost:3000 to access the application.

Usage

  1. Upon opening the application, you will be presented with the control panel.
  2. Adjust the desired parameters:
    • Number of dice: Choose a value between 2 and 30.
    • Delay: Define the duration between each dice deployment.
    • Steps: Set the number of times the dice are thrown in a single step.
    • Infinite Mode: Check this box to continuously roll the dice.
  3. Click the "Start" button to initiate the dice rolling process.
  4. Observe the chart as it dynamically updates with the sum of the dice numbers.
  5. Use the chart's zoom functionality, and export the chart in SVG, PNG, or CSV formats, as needed.
  6. Enjoy exploring the fascinating normal distribution or bell curve visualization provided by the chart.

Technologies Used

  • React
  • ApexCharts
  • CSS

Contribution

Contributions to React-Dice-Distribution are welcome! If you would like to contribute to the project, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and ensure that the code is properly formatted.
  4. Write appropriate tests for your changes, if applicable.
  5. Commit your changes with clear and descriptive commit messages.
  6. Push your changes to your forked repository.
  7. Submit a pull request to the main repository, providing a detailed description of your changes.

Please note that all contributions are subject to review. To ensure a smooth review process, consider the following:

  • Follow the coding style and conventions used in the project.
  • Keep your changes focused and avoid making unrelated modifications.
  • Write clear and concise documentation when introducing new features or modifying existing ones.
  • Ensure that all existing tests pass and write new tests to cover the changes you made.

Thank you for considering contributing to this project. Your help is greatly appreciated!

License

This project is licensed under the MIT License.