Skip to content

A simple dice poker game built in Java using JavaFX for the GUI. The game simulates dice rolls, displaying results in real-time with interactive UI elements. It showcases event handling, layout management, and random number generation in Java.

License

Notifications You must be signed in to change notification settings

prachidalal0/Project2_Java-DiceGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project 1: Java GUI Dice Game

Class

ITSS 3312

Date

Fall 2021

Description:

This project involves the development of a graphical user interface (GUI) for a poker dice game, using JavaFX to handle the GUI elements and Java for the application logic. The application allows users to roll virtual dice and displays the outcome in a visually appealing manner, simulating a real dice-rolling experience.

The program is designed to take user input for the number of dice and the type of dice to roll (such as standard 6-sided dice). The game also includes a reset button to clear the results and start a new roll. The system supports multiple dice rolls at once, and results are displayed with dynamic updates to the graphical interface.

Technologies Used:

  • Java
  • JavaFX (for GUI elements)
  • Scene Builder (optional, if used for UI design)

Key Features:

  • Customizable Dice Roll: Users can select how many dice to roll and the number of sides on each dice.
  • Interactive GUI: Simple buttons for rolling the dice and resetting the game, with a dynamic interface for displaying results.
  • JavaFX Integration: Utilizes JavaFX for rendering interactive components, including buttons, text fields, and images for dice.
  • Real-Time Feedback: The system immediately updates the displayed dice result when the user clicks the "Roll" button.
  • Random Number Generation: Implements the use of random number generators to simulate realistic dice rolls.

Methods Used:

  • JavaFX: Used JavaFX to create the GUI layout and handle event-driven programming, allowing for user interaction with buttons and input fields.
  • Event Handling: Set up event handlers for the "Roll Dice" and "Reset Game" buttons to update the GUI and simulate the dice rolls.
  • Randomization: Employed Java’s Random class to generate random numbers that simulate the rolling of dice.
  • Layout Management: Used layout managers such as VBox, HBox, or GridPane to arrange the graphical elements in an intuitive, user-friendly interface.
  • Custom Dice Images: (Optional) Used image files to visually represent the dice, creating a more immersive user experience.
  • Reset Functionality: Implemented a reset feature to allow users to clear the results and reinitiate the dice roll with the same settings.

About

A simple dice poker game built in Java using JavaFX for the GUI. The game simulates dice rolls, displaying results in real-time with interactive UI elements. It showcases event handling, layout management, and random number generation in Java.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages