Twenty-six or Thirty-six
Description
Origin: Matthew A. Bishop in HP-67-97-Users´ Library Solutions - Games of Chance.
Twenty-six:
Choose a number from 1 to 6. Roll 10 dice 13 times and count the number of times your chosen number is rolled. If it appears 11 times or less, you win $1.00; exactly 13 times, you win $0.50; 33 or more time, you win $2.00; 26 or more time, you win $1.00.
Each game cost $0.25, which is automatically deducted from your account.
Thirty-six:
Place a bet (deducted from your account). Player continues to roll dice until he decides to stop or the sum or all numbers rolled exceeds 36 (in the latter case, 1-1E or it loses). When the first player is done, if his total is 36 or less, the second rolls, following the same procedure. If the second player stops before his or its total exceeds 36, the totals are compared. Whoever comes closest to 36, wins. On a tie, you get your bet back.
Notes:
- The calculator will match your bet (winner gets total bet by both players); it uses a simple strategy to decide when to stop rolling dice.
- If you try to change the calculator's rolls in thirty-six (or press any key during the display of the calculator's rolling), you will automatically lose.
If you try to change the calculator's rolls in thirty-six (or press any key during the display of the calculator's rolling), you will automatically lose.
Sample Problem(s):
Play "Twenty-six"
Use .231659 as the seed. Use 4 as your number.
Calculate rolls:
1) 6144412142 6) 2533616115 11) 6351665453
2) 4455163443 7) 2554325666 12) 6322124643
3) 5655442523 8) 5261254245 13) 1634213363
4) 4223642136 9) 6131342352
5) 6533163612 10) 6363131626
And your number appeared 20 times. You therefore won $0.00, and overall you won -$0.25, i.e. lost $0.25, the $0.00 won and $0.25 for the game.
Play "Thirty-six"
- Bet $10.00. You go first. You roll 4, then again for a sum of 6, and so on. (sums only are displayed), to get 8, 12, 15, 21, 27, 29, 35. Stop here.
Now machine rolls. Again, the sum of the rolls is displayed: 1, 5, 9, 14, 17 ,19, 22, 23, 29, 30, 31, 37. As machine went over 36, it loses.
Display shows 20.00, which was twice what you bet. You won this.
- Now let the calculator go first. Bet: $10.00.
Calculator rolls dice; the sums of the rolls are 1, 6, 9, 10, 15, 22, 24, 25, 28, 32, 36 and stops here.
Now you go. You roll 5, 11, 15, 16, 17, 19, 23, 29, 33. Being daring you roll again. But your roll is one too many; you lose and -10.00. The display shows what you lost.
- To see what you won from these two games of thirty-six, press D. As 0.00 is displayed, you broke even
Program Resources
Labels
Name |
Description |
|
Name |
Description |
|
Name |
Description |
|
A |
26 |
|
2 |
# internal use |
|
9 |
HP loses |
|
B |
36 |
|
3 |
Display |
|
.0 |
Mann rolls |
|
C |
36 HP vs. Man |
|
4 |
Man loses |
|
.1 |
HP rolls |
|
D |
Winnings |
|
5 |
Man's dice |
|
.2 |
Display |
|
E |
Initialise random number generator |
|
6 |
HP's dice |
|
.3 |
# Loop 2 |
|
0 |
# Loop 1 |
|
7 |
Strategy |
|
.4 |
Man loses |
|
1 |
# internal use |
|
8 |
Strategy |
|
|
|
|
Storage Registers
Name |
Description |
|
Name |
Description |
|
0 |
Total (26) |
|
5 |
Bet (36) |
|
1 |
no. times (26) |
|
.5 |
Point |
|
2 |
Total (26) |
|
.6 |
Loop count |
|
3 |
Roll (36) |
|
I |
|
|
4 |
Roll (36) |
|
|
|
|
Flags
Program
Line |
Display |
Key Sequence |
|
Line |
Display |
Key Sequence |
|
Line |
Display |
Key Sequence |
|
000 |
|
|
|
067 |
30 |
− |
|
134 |
42,21, .0 |
f LBL . 0 |
|
001 |
42,21,11 |
f LBL A |
|
068 |
34 |
x↔y |
|
135 |
42, 7, 2 |
f FIX 2 |
|
002 |
44 .5 |
STO . 5 |
|
069 |
43 10 |
g x≤y |
|
136 |
42,21, 5 |
f LBL 5 |
|
003 |
48 |
. |
|
070 |
42, 6,25 |
f ISG I |
|
137 |
32 .4 |
GSB . 4 |
|
004 |
2 |
2 |
|
071 |
1 |
1 |
|
138 |
44,40, 3 |
STO + 3 |
|
005 |
5 |
5 |
|
072 |
45 25 |
RCL I |
|
139 |
42,21, 3 |
f LBL 3 |
|
006 |
44,30, 0 |
STO − 0 |
|
073 |
43,30, 5 |
g TEST x=y |
|
140 |
3 |
3 |
|
007 |
0 |
0 |
|
074 |
0 |
0 |
|
141 |
6 |
6 |
|
008 |
44 1 |
STO 1 |
|
075 |
44,40, 0 |
STO + 0 |
|
142 |
45 3 |
RCL 3 |
|
009 |
1 |
1 |
|
076 |
45 1 |
RCL 1 |
|
143 |
43,30, 7 |
g TEST x>y |
|
010 |
3 |
3 |
|
077 |
42 31 |
f PSE |
|
144 |
22 4 |
GTO 4 |
|
011 |
44 .6 |
STO . 6 |
|
078 |
34 |
x↔y |
|
145 |
42 31 |
f PSE |
|
012 |
42,21, .3 |
f LBL . 3 |
|
079 |
42 31 |
f PSE |
|
146 |
43,30, 1 |
g TEST x>0 |
|
013 |
1 |
1 |
|
080 |
45 0 |
RCL 0 |
|
147 |
22 3 |
GTO 3 |
|
014 |
0 |
0 |
|
081 |
43 32 |
g RTN |
|
148 |
43,30, 2 |
g TEST x<0 |
|
015 |
48 |
. |
|
082 |
42,21, 1 |
f LBL 1 |
|
149 |
22 5 |
GTO 5 |
|
016 |
0 |
0 |
|
083 |
1 |
1 |
|
150 |
43 32 |
g RTN |
|
017 |
0 |
0 |
|
084 |
44,40, 1 |
STO + 1 |
|
151 |
42,21, 4 |
f LBL 4 |
|
018 |
0 |
0 |
|
085 |
43 35 |
g CLx |
|
152 |
42, 7, 2 |
f FIX 2 |
|
019 |
0 |
0 |
|
086 |
40 |
+ |
|
153 |
45 5 |
RCL 5 |
|
020 |
1 |
1 |
|
087 |
43 32 |
g RTN |
|
154 |
16 |
CHS |
|
021 |
44 25 |
STO I |
|
088 |
42,21, 2 |
f LBL 2 |
|
155 |
31 |
R/S |
|
022 |
0 |
0 |
|
089 |
48 |
. |
|
156 |
42,21, .1 |
f LBL . 1 |
|
023 |
36 |
ENTER |
|
090 |
5 |
5 |
|
157 |
42, 7, 0 |
f FIX 0 |
|
024 |
42,21, 0 |
f LBL 0 |
|
091 |
44 25 |
STO I |
|
158 |
42,21, 6 |
f LBL 6 |
|
025 |
1 |
1 |
|
092 |
43 35 |
g CLx |
|
159 |
32 .4 |
GSB . 4 |
|
026 |
0 |
0 |
|
093 |
40 |
+ |
|
160 |
44,40, 4 |
STO + 4 |
|
027 |
20 |
× |
|
094 |
43 32 |
g RTN |
|
161 |
3 |
3 |
|
028 |
32 .4 |
GSB . 4 |
|
095 |
42,21,12 |
f LBL B |
|
162 |
6 |
6 |
|
029 |
45 .5 |
RCL . 5 |
|
096 |
43, 4, 1 |
g SF 1 |
|
163 |
45 4 |
RCL 4 |
|
030 |
43,30, 5 |
g TEST x=y |
|
097 |
44 5 |
STO 5 |
|
164 |
43, 5, 3 |
g CF 3 |
|
031 |
32 1 |
GSB 1 |
|
098 |
44,30, 2 |
STO − 2 |
|
165 |
42 31 |
f PSE |
|
032 |
43 35 |
g CLx |
|
099 |
0 |
0 |
|
166 |
43, 6, 3 |
g F? 3 |
|
033 |
40 |
+ |
|
100 |
44 3 |
STO 3 |
|
167 |
22 4 |
GTO 4 |
|
034 |
40 |
+ |
|
101 |
44 4 |
STO 4 |
|
168 |
43,30, 7 |
g TEST x>y |
|
035 |
42, 5,25 |
f DSE I |
|
102 |
32 .0 |
GSB . 0 |
|
169 |
22 9 |
GTO 9 |
|
036 |
22 0 |
GTO 0 |
|
103 |
32 .1 |
GSB . 1 |
|
170 |
43, 6, 1 |
g F? 1 |
|
037 |
42 31 |
f PSE |
|
104 |
42,21, .2 |
f LBL . 2 |
|
171 |
22 7 |
GTO 7 |
|
038 |
45 .6 |
RCL . 6 |
|
105 |
42, 7, 2 |
f FIX 2 |
|
172 |
42,21, 8 |
f LBL 8 |
|
039 |
1 |
1 |
|
106 |
45 4 |
RCL 4 |
|
173 |
3 |
3 |
|
040 |
30 |
− |
|
107 |
45 3 |
RCL 3 |
|
174 |
3 |
3 |
|
041 |
44 .6 |
STO . 6 |
|
108 |
43,30, 7 |
g TEST x>y |
|
175 |
43 10 |
g x≤y |
|
042 |
43,30, 0 |
g TEST x≠0 |
|
109 |
22 9 |
GTO 9 |
|
176 |
43 32 |
g RTN |
|
043 |
22 .3 |
GTO . 3 |
|
110 |
34 |
x↔y |
|
177 |
22 6 |
GTO 6 |
|
044 |
1 |
1 |
|
111 |
43,30, 7 |
g TEST x>y |
|
178 |
42,21, 7 |
f LBL 7 |
|
045 |
48 |
. |
|
112 |
22 4 |
GTO 4 |
|
179 |
45 3 |
RCL 3 |
|
046 |
0 |
0 |
|
113 |
45 5 |
RCL 5 |
|
180 |
34 |
x↔y |
|
047 |
0 |
0 |
|
114 |
44,40, 2 |
STO + 2 |
|
181 |
43,30, 5 |
g TEST x=y |
|
048 |
0 |
0 |
|
115 |
42 31 |
f PSE |
|
182 |
22 12 |
GTO B |
|
049 |
0 |
0 |
|
116 |
45 2 |
RCL 2 |
|
183 |
43 10 |
g x≤y |
|
050 |
0 |
0 |
|
117 |
43 32 |
g RTN |
|
184 |
22 6 |
GTO 6 |
|
051 |
1 |
1 |
|
118 |
42,21,13 |
f LBL C |
|
185 |
43 32 |
g RTN |
|
052 |
44 25 |
STO I |
|
119 |
43, 5, 1 |
g CF 1 |
|
186 |
42,21, 9 |
f LBL 9 |
|
053 |
45 1 |
RCL 1 |
|
120 |
44 5 |
STO 5 |
|
187 |
42, 7, 2 |
f FIX 2 |
|
054 |
3 |
3 |
|
121 |
44,30, 2 |
STO − 2 |
|
188 |
45 5 |
RCL 5 |
|
055 |
3 |
3 |
|
122 |
0 |
0 |
|
189 |
2 |
2 |
|
056 |
43 10 |
g x≤y |
|
123 |
44 3 |
STO 3 |
|
190 |
20 |
× |
|
057 |
42, 6,25 |
f ISG I |
|
124 |
44 4 |
STO 4 |
|
191 |
44,40, 2 |
STO + 2 |
|
058 |
7 |
7 |
|
125 |
32 .1 |
GSB . 1 |
|
192 |
31 |
R/S |
|
059 |
30 |
− |
|
126 |
32 .0 |
GSB . 0 |
|
193 |
42,21, .4 |
f LBL . 4 |
|
060 |
43 10 |
g x≤y |
|
127 |
22 .2 |
GTO . 2 |
|
194 |
42 36 |
f RAN # |
|
061 |
42, 6,25 |
f ISG I |
|
128 |
42,21,14 |
f LBL D |
|
195 |
6 |
6 |
|
062 |
2 |
2 |
|
129 |
45 2 |
RCL 2 |
|
196 |
20 |
× |
|
063 |
10 |
÷ |
|
130 |
43 32 |
g RTN |
|
197 |
1 |
1 |
|
064 |
43,30, 5 |
g TEST x=y |
|
131 |
42,21,15 |
f LBL E |
|
198 |
40 |
+ |
|
065 |
32 2 |
GSB 2 |
|
132 |
44 36 |
STO RAN # |
|
199 |
43 44 |
g INT |
|
066 |
2 |
2 |
|
133 |
43 32 |
g RTN |
|
200 |
43 32 |
g RTN |
|