Post Reply 
(15c)(35s) Yahtzee (Yam) game
01-23-2020, 10:56 PM (This post was last modified: 01-23-2020 10:58 PM by pinkman.)
Post: #2
RE: (15c)(35s) Yahtzee (Yam) game
Because nobody asked for it, I created the HP15c version!

Same usage :
Start the game by fixing display to 0, then enter 0 and USER E.

The computer choses 5 dice, eg 45331
You can chose the dice you want to keep by simply keying them, eg 33
Then start the program again with USER E.
The next roll will only chose the dice you need, keeping the ones you selected, eg 33613
To start with a roll of all 5 dice simply key 0 then USER E.

Example :
0
USER E

display: 12565

125 (keep dice 1, 2 and 5)
USER E

display: 12533

1253
USER E

display: 12534

You did it!

Next player: 0 USER E

Code:


001 LBL E
002 STO 5
003 X<=0 (test 4)
004 GTO .1
005 LOG
006 INT
007 4
008 -
009 CHS
010 GTO .2
011 LBL .1
012 5
013 LBL .2
014 STO I
015 10^x
016 STOx 5
017 LBL .3
018 RAN#
019 6
020 x
021 1
022 +
023 INT
024 RCL I
025 1
026 -
027 10^x
028 x
029 STO+ 5
030 DSE I
031 GTO .3
032 RCL 5
033 RTN

Uses:
Registers 5 and I (you can change them easily)
Labels E, .1, .2, .3
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(15c)(35s) Yahtzee (Yam) game - pinkman - 10-29-2018, 11:17 PM
RE: (15c)(35s) Yahtzee (Yam) game - pinkman - 01-23-2020 10:56 PM



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