Sunday, June 3, 2018

Sharp EL-5500 III: Slots: Triples and Cherries Pay


Sharp EL-5500 III:  Slots:  Triples and Cherries Pay

BAR | BAR | BAR
   7    |   7    |   7
   🍒  |   🍒   |  🍒

Note: Symbols that are produced by Unicode should, but may not show up on all browsers. Please make sure your browsers are updated to the latest version.  

Take a Spin

This program is a three reel slot simulator, each with ten symbols:

0:  BAR
1:  Cherry (🍒)
2:  Orange
3:  Plum
4:  Bell (🔔)
5:  Lemon (🍋)
6:  Watermelon (🍉)
7:  Seven
8:  Apple (🍎)
9:  Shamrock ()

To see the version for the HP 32SII, please click here:  https://edspi31415.blogspot.com/2018/06/hp-32s-ii-two-versions-of-slots.html

🍒 | 🍒 | 🍒

Each spin has an ante of 25¢.  The results appear in the form 0.###  (ignore the left most 0.)  See the Take a Spin section above for the symbols used in the game.

The payouts are these:

A cherry in any one slot (0.1xy, 0.x1y, or 0.xy1):  $1.00
Any two cherries (0.11x, 0.1x1, 0.x11):  $10.00
Three BARS (0.000):  $35.00  ($15 + $20)
Three Sevens (0.777):  $70.00  ($50 + $20)
Any other triple (0.xxx, x0 and x7):  $20.00

Note: You can use any line numbering system, I used the line numbers 1400-1499 for this program. The first “D” on line 1400 is optional, but is there to make the program a defined program for the EL-5500 III, running it by pressing [DEF] [ D ].  If you are using another calculator, this may not be an option, so ignore the “D” in that case.

Sharp EL-5500 III Program Slots: Triples and Cherries Pay

1400: “D”: PAUSE “Slots”   
1402: CLEAR
1404: INPUT “Bankroll: $”; J
1406: P = 0
1408: J = J - .25
1410: N = .1*(RND 10-1)+.01*(RND 10-1)+.001*(RND 10 – 1)
1412: PRINT USING “########”; 1000*N
1414: S = N/.111
1416: IF (S-INT(S)) = 0 THEN 1450
1418: X = N: GOSUB 1430
1420: X = S: GOSUB 1430
1422: X = S: GOSUB 1430
1424: J = J + INT(TEN (P – 1))  // TEN: 10^x
1426: GOTO 1470

1430: I = INT(X*10)
1432: S = 10*X – I
1434: IF I = 1 THEN LET P = P + 1
1436: RETURN

1450: IF S = 0 THEN LET J = J + 35
1452: IF S = 7 THEN LET J = J + 50
1454: IF S<>0 AND S<>7 THEN LET J = J + 20
1456: GOTO 1470

1470: PRINT “Bank $”; USING “##########.##”; J
1472: INPUT “1 = Again ? :”, C
1474: IF C = 1 THEN 1406
1476: END

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.