Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.1 KB

File metadata and controls

51 lines (35 loc) · 1.1 KB

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