A simple console-based Dice Rolling Simulator built with Java. Enter how many dice you'd like to roll, and get a visual representation of each roll along with the total score.
- Roll any number of dice
- ASCII representation of each dice face (1 to 6)
- Displays total score after all rolls
- Simple and intuitive user input
- Java 21 (OpenJDK)
- IDE (optional but recommended): JetBrains IntelliJ IDEA
- Clone this repository or download the
DiceRoll.java
file. - Open JetBrains IntelliJ IDEA.
- Click
File
>Open...
, then select the folder containingDiceRoll.java
. - IntelliJ will detect it as a Java project. If prompted, select Java 21 SDK.
- To run:
- Right-click
DiceRoll.java
- Click
Run 'DiceRoll.main()'
- Right-click
javac DiceRoll.java
java DiceRoll
- You'll be prompted to enter how many dice you want to roll.
- Each roll displays:
- The number rolled
- An ASCII visual of the dice
- Final total score is shown at the end.
Enter the amount of Dice you want to roll: 3
Your No. 1 Dice : 4
---------
| 0 0 |
| |
| 0 0 |
---------
Your No. 2 Dice : 6
---------
| 0 0 |
| 0 0 |
| 0 0 |
---------
Your No. 3 Dice : 2
---------
| 0 |
| |
| 0 |
---------
Final Score: 12
- Currently uses basic input handling (note: integer input expected)
- Easily extendable with more visual features or dice types
- Can be used for dice games, simulations, or teaching
- Java Version: OpenJDK 21
- IDE Used: JetBrains IntelliJ IDEA
This project is open-source and available under the MIT License.