Casio Calculators:Programs:Slot Machine
Slot Machine for Dummies



(c) Copyright Hidetake Jo 1996
hjo@engin.umich.edu
Program: Slot Machine for Dummies
Size: medium
Models: all
Author: HideTake Jo
Description: User Friendly Interface, and a graphical animation of the slotmachine. Nothing impressive... Beware though that the odds are something similar to the slotmachine in Las Vegas.... Hey anyone can play this game :-P You place your bet using the User Friendly Interface and just "PULL!!!!" :-)
Happy Coding :-)
There may be bugs in this code...if your program doesn't work, send me a e-mail giving me the exact error message :-) Thanx!


Cls
ViewWindow 1,126,1,1,99,1
Plot 1,10
Plot 126,10
Line
For 1->A To 126 Step 21
Plot A,1
Plot A,10
Line
Next
Text 58,3,"QUIT"
Text 58,25,"+100"
Text 58,45,"-100"
Text 58,69,"+10"
Text 58,90,"-10"
Text 58,109,"PULL"
Plot 33,30
Plot 33,80
Line
Plot 66,80
Line
Plot 66,30
Line
Plot 33,30
Line
Plot 33,60
Plot 66,60
Line
Text 35,35,"SLOTMAN"
1->Z
0->R
100->B
Text 20,80,"BUDGET:"
Text 20,110,B
Text 30,80,"BET:"
Text 30,100,R
0->D
While Z=1
GetKey=79 =>0->Z
If GetKey=69
Then R+100->R
BR-100->R
1->D
IfEnd
If GetKey=59
Then R-100->R
R<0 =>R+100->R
1-D
IfEnd
If GetKey=49
Then R+10->R
BR-10->R
1-D
IfEnd
If GetKey=39
Then R-10->R
R<0 =>R+10->R
1->D
IfEnd
If D=1
Then 0->D
Text 30,100," " {7 spaces}
Text 30,100,R
Plot 1,1
IfEnd
If GetKey=29
Then For 1->C To 20
Int 9Ran#->M
Int 9Ran#->N
Int 9Ran#->O
Text 17,38,M
Text 17,49,N
Text 17,60,O
Next
For 1->C To 10
Int 9Ran#->N
Int 9Ran#->O
Text 17,49,N
Text 17,60,O
Next
For 1->C To 5
Int 9Ran#-N
Text 17,60,O
Next
If (M =/= N) Or (N =/=O)
Then B-R->B
Text 20,110," " {7 spaces}
Text 20,110,B
Plot 1,1
IfEnd
If (M=N) And (N=O)
Then 9R+B->B
Text 20,110, " " {7 spaces}
Plot 1,1
For 1-S To 15
Text 45,82,"JACKPOT"
Text 45,82," " {9 spaces}
Next
IfEnd
IfEnd
Text 50,4,"WHOA, NO MORE MONEY-PUSH [F1]"
WhileEnd " " {1 space}