## Slot Machine

Just BASIC Games
brahn
Posts: 27
Joined: Fri Aug 26, 2005 2:54 pm
Location: Moberly, MO

### Slot Machine

A slot machine made with jb basic. Thanks for all the shared code that I read to learn how to do this. I added a couple of "extras" to make it a little more fun.

Brian M.
You do not have the required permissions to view the files attached to this post.
Last edited by brahn on Thu Nov 03, 2005 6:08 pm, edited 1 time in total.
uncleBen
Posts: 63
Joined: Sat Oct 29, 2005 9:03 pm
That's a good one. I liked the save/load idea a lot.

if I'm not mistaken, probability for win is calculated so:
the probability for bar-bar-bar is 1/5*1/5*1/5 = 1/125 (because there seems to be a 1 out of 5 chance for bar turning up in any window - thats's ok)
the probability for winning any of the other two prizes is 4/5*2/5*2/5 = 16/125.
That seems to mean, that for every \$8 you put in, the casino owner will pay you \$37.5.
Too bad this is not real money.

May-be a way to make these probabilities more lifelike (how sad), you could pick a random number and
if it is (say) <.20 (= probability 20%) then image\$ = "bar",
if it is >= 0.20 and < 0.50 (= 30%) then image\$ = "cherry"
if it is >= 0.5 = (= 50%) then image\$ = "lemon"
If you play around with these numbers a little (make sure they cover the range from 0 to 0.999 continuously), you might find a way, how to make that slot machine earn some income for the owner
brahn
Posts: 27
Joined: Fri Aug 26, 2005 2:54 pm
Location: Moberly, MO
Thanks, I'm glad you liked it. It has been awhile since I messed with the rnd feature. But I'll tweak the numbers a bit, And post updated code.

Thanks Brian M.
brahn
Posts: 27
Joined: Fri Aug 26, 2005 2:54 pm
Location: Moberly, MO

### Slot Machine update

Updated the post above.

Brian M.