Slot Machine Code Java
- Slot Machine Java Code While/for Loops
- Slot Machine Code Java Compiler
- Slot Machine Code Java Tutorial
- Java Slot Machine Source Code
Greenhorn
posted 13 years ago
- Write a java application program that simulates a simple slot machine in which three numbers between 0 and 9 are randomly selected and printed side by side. The program will allow the user to place a bet, and then make a payout if any two of the numbers.
- Posted: Sun Nov 04, 2007 12:13 am Post subject: RE:I need help with creating a slot machine using java. Heres an thought, why dont you peek in the page source code, and dl that slot machine from their server.
- MainCLI.java A class to run a system I/O loop. MediumExample.java This is the Main class. SlotMachine.java The model. SlotMachineTab.fxml The view template. SlotMachineTabController The controller for the view template; slotmachinetab.css Any styles for the template would go here.
- What the code is supposed to do is create a 3 reel, 6 icon slot machine in two classes that utilize objects that, when ran, will say something like 'spin x: orange grape cherry, you lost' It will keep running until you win. To win, you have to have all 3 reels be the same ex.' Spin x: cherry cherry cherry, you won' and then stop running.
I have been given a piece of coursework to do using random numbers. I have decided to do a slot machine for it. I am having trouble and would like help so that the result either adds 2 pound on to there money if they win or takes one off if they lose. I also would like a loop so that when they have no money left they can not play.
Any help you could give would be greatly appreciated
EDIT by mw: Added Code Tags.
[ March 20, 2007: Message edited by: marc weber ]
Any help you could give would be greatly appreciated
EDIT by mw: Added Code Tags.
[ March 20, 2007: Message edited by: marc weber ]
Slot Machine Java Code While/for Loops
Sheriff

I'm having issues with a homework problem for my CS class. I'm supposed to make a slot machine and I can't get the continue to work, I get that the scanner nextLine method skips over the line and keeps what was there but it won't let me enter anything and it just ends the program.
Originally posted by ant williams:
...would like help so that the result either adds 2 pound on to there money if they win or takes one off if they lose...
Slot Machine Code Java Compiler
Welcome to JavaRanch!Slot Machine Code Java Tutorial
You already have a field called 'money,' and you have an if/else condition for determining whether the player wins or loses. So what would make sense here? Do you have any ideas about how to approach this?Java Slot Machine Source Code
'We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award.' ~Joe Strummer
sscce.org