Post Reply 
Ok, please look over the HP 41 Yahtzee game here
01-26-2016, 09:33 PM
Post: #8
New version of Yahztee game
Saved 27 bytes incorporating your combination routine. Many thanks. Now 611 bytes.

Code:

Code:
LBL "YZ"
CLRG
"SEED?"
PROMPT
STO 00
LBL 16
.02
LBL 14
CF IND X
ISG X
GTO 14
14.018
STO 23
FIX 00
CF 29
LBL 15
12345
GTO 71
LBL 17
1
ST+ 19
RCL 19
3
X<=Y?
GTO 22
>" ROLL?"
LBL 27
CLX
PROMPT
INT
X<0?
GTO 27
X=0?
SF 00
X=0?
GTO 61
LBL 71
10
/
ENTER
INT
X<>Y
FRC
10
*
X=0?
GTO 20
5
X<>Y
X>Y?
GTO 72
X<>Y
RDN
13
+
RCL 00
997
*
FRC
STO 00
6
*
1
+
INT
STO IND Y
LBL 72
RCL Z
GTO 71
LBL 20
XEQ 40
LBL 61
CLA
ARCL 14
ARCL 15
ARCL 16
ARCL 17
ARCL 18
FS?C 00
GTO 22
GTO 17
LBL 65
ABS
RCL 12
X=0?
GTO 61
RDN
RCL 14
RCL 18
X=Y?
SF 20
RCL Z
GTO 64
LBL 22
>" SCORE?"
LBL 66
CLX
CF 20
PROMPT
INT
13
X<>Y
X>Y?
GTO 66
X=0?
GTO 25
X<0?
GTO 65
FS? IND X
GTO 66
LBL 64
STO 21
RCL 23
STO 22
CLX
STO 19
STO 20
XEQ IND 21
CF 00
"ROW "
ARCL 21
>"="
ARCL 20
AVIEW
RCL 20
STO IND 21
SF IND 21
X!=0?
FC?C 20
GTO 63
2
10^X
ST+ 12
>" "
ARCL X
PSE
AVIEW
PSE
LBL 63
CLX
STO 20
1.013
LBL 75
FC? IND X
GTO 15
ISG X
GTO 75
"DONE"
AVIEW
RCL 01
RCL 02
RCL 03
RCL 04
+
+
+
RCL 05
+
RCL 06
+
"TOP="
ARCL X
>"+"
63
X<=Y?
35
X>Y?
0
ARCL X
X<>Y
RDN
+
AVIEW
PSE
RCL 07
RCL 08
RCL 09
+
+
RCL 11
+
RCL 12
+
RCL 13
+
"LOWER="
ARCL X
AVIEW
PSE
+
"END="
ARCL X
PROMPT
GTO 16
LBL 25
CLA
1.013
LBL 00
FC? IND X
ARCL X
FC? IND X
>","
ISG X
GTO 00
AVIEW
PSE
GTO 61
LBL 01
LBL 02
LBL 03
LBL 04
LBL 05
LBL 06
RCL IND 22
RCL 21
X=Y?
ST+ 20
ISG 22
GTO 06
RTN
LBL 13
FS?C 14
RTN
RCL 14
RCL 15
RCL 16
RCL 17
+
+
+
RCL 18
+
STO 20
RTN
LBL 12
RCL 18
RCL 14
X!=Y?
RTN
BEEP
50
STO 20
RTN
LBL 07
RCL 14
RCL 16
X=Y?
GTO 13
RCL 18
X=Y?
GTO 13
RCL 17
RCL 15
X=Y?
GTO 13
RTN
LBL 08
RCL 14
RCL 17
X=Y?
GTO 13
RCL 15
RCL 18
X=Y?
GTO 13
RTN
LBL 09
SF 14
XEQ 07
FS?C 14
RTN
RCL 14
RCL 15
X!=Y?
RTN
RCL 17
RCL 18
X!=Y?
RTN
25
STO 20
RTN
LBL 10
XEQ 35
30
ENTER
7
GTO 36
LBL 11
XEQ 35
40
ENTER
6
LBL 36
RCL Z
X>Y?
RTN
RCL Z
STO 20
RTN
LBL 35
RCL 15
RCL 17
*
10
X=Y?
RTN
RCL 23
ISG X
RCL 14
ENTER
LBL 50
SIGN
+
RCL IND Y
X=Y?
DSE T
X<>Y
ISG Z
GTO 50
R^
RTN
LBL 40
DEG
RCL 17
RCL 16
RCL 15
RCL 14
X>Y?
RAD
X>Y?
X<>Y
STO 14
RDN
X>Y?
RAD
X>Y?
X<>Y
STO 15
RDN
X>Y?
RAD
X>Y?
X<>Y
STO 16
RDN
RCL 18
X<Y?
RAD
X<Y?
X<>Y
STO 18
X<>Y
STO 17
FS? 43
GTO 40
END

HP 41 barcode:
YZ Barcode

Raw file:
Yahtzee raw file
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
New version of Yahztee game - Gene - 01-26-2016 09:33 PM



User(s) browsing this thread: 4 Guest(s)