Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Extremely Basic Slot Machine

A simple Java Swing slot machine demo. It creates a desktop window with three random number reels, a bet field, a credit counter, and a play button.

Features

  • Java Swing user interface
  • Three random number reels
  • Starting credit balance and adjustable bets
  • Basic payout rules for two or three matching numbers
  • Optional "Always win" checkbox for testing
  • Sound effects for win and loss outcomes

Requirements

  • Java JDK 8 or newer

Running

The source file is currently stored as Code. Because it contains a public Java class named SlotMachine, copy or rename it before compiling:

cp Code SlotMachine.java
javac SlotMachine.java
java SlotMachine

On Windows PowerShell:

Copy-Item Code SlotMachine.java
javac SlotMachine.java
java SlotMachine

Payouts

  • First two reels match: 2x the bet
  • All three reels match: 10x the bet

Notes

The app references local WAV files for sound effects. If those files are not available on your computer, update the paths in Code or remove the sound effect blocks before running.

License

MIT

About

My 2nd project (:

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors