Skip to content

About

🎲 Console-based Java dice roller with ASCII art and input validation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎲 Virtual Dice Roller


img.png


Welcome to the Virtual Dice Roller! A fun and interactive console-based Java project where you can roll dice with any number of sides, see cool ASCII art, and play as many times as you want! πŸŽ‰


🎯 Purpose / Learning Goals

This project was created as a study and practice project while learning Java for backend development. The main objectives and skills practiced include:

  • 🟒 Understanding Java basics: classes, methods, loops, conditionals, and input/output.
  • 🟒 Practicing user input validation using Scanner.
  • 🟒 Implementing nested loops for game flow control.
  • 🟒 Learning Collections with Set for managing valid user responses.
  • 🟒 Working with random numbers using Random.
  • 🟒 Practicing modular code design by separating concerns into methods like printDiceArtMenu(), printDiceArtFinal(), and readPositiveInt().
  • 🟒 Exploring object-oriented programming (OOP) with the nested Dice class.
  • 🟒 Improving code readability with proper naming conventions, constants, and comments.
  • 🟒 Handling edge cases, such as invalid inputs or zero/negative dice sides.

✨ Outcome: This project was a hands-on way to consolidate Java fundamentals, practice good coding habits, and simulate a small interactive console app, a foundation for more complex backend projects in the future.


πŸš€ Features

  • 🎲 Roll a dice with any number of sides.
  • 🎨 Fun ASCII art before and after rolling the dice.
  • βœ… User input validation for dice sides and repeat choices.
  • 🌐 Supports multiple yes/no responses in different languages: y, yes, s, sim, n, no, nop, nΓ£o.
  • πŸ–₯️ Clean and user-friendly console interface.
  • πŸ’‘ Reusable Dice class for object-oriented design practice.

πŸ› οΈ Getting Started

Prerequisites

  • Java 17+ installed on your system.
  • A terminal or IDE (IntelliJ IDEA, Eclipse, VS Code, etc.).

Running the Project

  1. Clone this repository or copy the files locally.
  2. Compile the project using the terminal:
    javac DiceRoller.java

About

🎲 Console-based Java dice roller with ASCII art and input validation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages