Java Code That Acts As A Slot Machine

Greenhorn

Linked List is a part of the Collection framework present in java.util package.This class is an implementation of the LinkedList data structure which is a linear data structure where the elements are not stored in contiguous locations and every element is a separate object with a data part and address part. So machine X might be able to be set to 100.7%, 99.5%, 98.3%, 85.4%, and 75.7%. Part of having a machine approved for sale is that millions of simulations are run on the machine itself to verify that the random number generator will, over time, pay back at least the percentage the machine is set to.

posted 13 years ago

Java Code That Acts As A Slot Machine Invented

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 ]
Sheriff
posted 13 years ago

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 Java Program


Welcome to JavaRanch!

Slot Machine Simulation Java Program

Machine

Java Code That Acts As A Slot Machines


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 Code That Acts As A Slot Machine Machines

'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