Post Reply 
Ok, please look over the HP 41 Yahtzee game here
01-23-2016, 11:06 PM (This post was last modified: 01-24-2016 12:09 AM by Gene.)
Post: #1
Ok, please look over the HP 41 Yahtzee game here
The .raw file linked to here is the current version of my 31 year on/off interest in a game for the HP 41 platform to play the dice game Yahtzee. The .raw file program is 636 bytes long.

Yahztee raw file

Wiki link for basic rules of the game here:

wiki link

The game includes the small straight routine posted here on the forum by Werner as part of the HHC 2015 programming contest. I modified it only to change register references and the labels used. Note: The sorting routine uses the RAD indicator in the display to indicate numbers are being exchanged/sorted. I find this rather cool to see it flashing on and off.

Basically to play:

XEQ YZ
Enter a decimal seed between 0 and 1.
Choose the position of the dice you wish to roll. If you see 23356 ROLL? displayed and want to keep the 3's and roll the 2, 5 and 6 again, key 145 R/S. You get two rolls and then have to score. To score, enter the number of the scorecard row you want to use and press R/S. If you cannot remember which ones are still open, press 0 at this point and press R/S.

By the way, if you get a good roll initially or before prompted for the SCORE? you can enter a 0 instead of the positions of the die and it will skip rolling any dice and immediately go to the SCORE prompt. Why would you want to do this? Suppose you get 22222 ROLL? on the first roll? That's a yahtzee and you should want to score it in row 12. To do that, press 0 R/S and you will see 22222 SCORE? Key 12 R/S and it will score in yahtzee if that row was previously unused. If you skip ahead to SCORE? but then realize you really want to go back and ROLL then you are stuck. No can do.

The scorecard is as follows:
1-6 - score the number of each 1, 2, ... 6 you received.
7 - 3 of a kind
8 - 4 of a kind
9 - full house (3 of a number and then 2 of some other number)
10 - small straight
11 - large straight
12 - yahtzee (5 of a kind)
13 - chance - total of all dice shown

If you get 63 or more points in the rows 1-6 of your scorecard you get a bonus of 35 extra points.

This game does not implement "bonus" yahtzees if you get more than one in a game.



Feel free to :

1) Find bugs :-)
2) Rationalize the labels used. Been a long time and other than labels 1-13 the labels used are not critical.
3) Suggest improvements
4) Add bonus yahtzee scoring
5) Play it and have fun. :-)

I'm hoping some of you can check it out before it gets committed to Angel to update the version used in the FUNSTUFF rom that goes into the HP 41CL. The program in there now has bugs in the LBL 10 small straight section.

Thanks and enjoy.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Ok, please look over the HP 41 Yahtzee game here - Gene - 01-23-2016 11:06 PM
New version of Yahztee game - Gene - 01-26-2016, 09:33 PM



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