Post Reply 
(HP12C) infinite Yam's
03-30-2020, 09:30 PM
Post: #1
(HP12C) infinite Yam's
This post one is for the for a dice game : the Yam's

I had written a first version for hp11c (hp15c) with a sort, by insertion, roll dice after roll dice, with a large use of the index register (I) and several registers.
Not really easy, in fact, on the hp12c. Not really fast, either.

So, I used the famous virtual array (see Mastermind...) and it gives a cheap method of sort.

The program is this :

- generating 5 rolls dice with a display (PSE) roll by roll, increased by a full intermediate display (additional PSE) from the second roll of dice. In the same time, making the distribution of each roll dice in the virtual array, with the help of the 10^x function.
- reread of the array, level by level, from 10^6 to 10^1 position and insertion, dice by dice (from 6 to 1), in the final display
- displaying and waiting for a list of the selected dice (with intermediate 0 or not)
- key in the selected dice and R/S : by example 66044 on 66544, [or 4664 (why not ?)] and R/S
- dispatching of the selected dice on the same, cleared, virtual array
- returning to the initial and general process to add from 0 to 5 rolls dice on the entry of the selected dice (in meaning to complete to 5 dice)

So, the process repeats itself over and over. When you decide to change (discard) all the group at display, you just press CLx and R/S.

You can respect the structure of the Yam's game, or not : 3 throws at most for each move
My program doesn't control the combinations at all...


Attached File(s)
.pdf  HP12C - Yam's - lmaN pour MoHPC.pdf (Size: 32.69 KB / Downloads: 14)
Find all posts by this user
Quote this message in a reply
03-31-2020, 09:04 AM
Post: #2
RE: (HP12C) infinite Yam's
Very nice program to keep track of the numbers of dice especially five dice altogether !!

Would be nice if you show some example of how to run this game.

I like to see this program on HP-11C too

Thank You

Gamo
Find all posts by this user
Quote this message in a reply
03-31-2020, 05:12 PM
Post: #3
RE: (HP12C) infinite Yam's
Thanks a lot, Gamo.

So, at first, I propose you to store 0,123456789 in register i
f 0 and g GTO 00 (or f CLEAR PRGM, only in mode RUN, of course) and R/S
hp12c answers 1 / 1 / 11 / 6 / 116 / 4 / 1164 / 2 / 11642 and finally stops with 64211 (MOVE # 1)
I choose 211 (by the keyboard) and R/S
Then hp12c says 4 / 2114 / 5 / 21145 and keep waiting on 54211 (MOVE # 2)
I type 11 - that gives 54200. I continue with R/S
It's make 2 / 5422 / 3 / 54223 and finally 54322 (MOVE #3) ==> little suite

New sequence with CLx, R/S
Back with 5 / 6 / 56 / 2 / 562 / 6 / 5626 / 6 / 56266 and 66652 (MOVE # 1)
I keep 666 R/S
4 / 6664 / 6 / 66646 and 66664 (MOVE # 2)
Type 4 - (become 66660) R/S
6 / 66666 and 66666 (MOVE # 3) ==> Yam's

CLx, R/S, etc...

In second time, I suppose you want to speak about the old and initial version of the Yam's.
This one, I wrote initially for the HP11C !
So, I join with pleasure the PDF listing on this post to your attention, Gamo.
Just beware : the entry mode is a little different from the one used in the last HP12C version.
That is, in the HP11C you have to mark expressly each position dice (in the proposed list of 5) by a non 0 digit.
For example, to keep 542 from 54211, as above, you should prepare 54200 (or only 11100) before R/S
Other example, to choose 666 on 66652, the input should be 66600 (or 11100) before R/S
(In case of 611 after 64211, 60011 - or 10011 - is imperative; but for 211, as in the example, 211 - or 111 - is enough !)

My current favorite Yam's program for the HP11C is close to this one I proposed for the HP12C, but with RAN# and f LBL steps !


--------------------------------------------------------------------------------------------------------------------------------
(03-31-2020 09:04 AM)Gamo Wrote:  Very nice program to keep track of the numbers of dice especially five dice altogether !!

Would be nice if you show some example of how to run this game.

I like to see this program on HP-11C too

Thank You

Gamo


Attached File(s)
.pdf  HP11C - Yam's - old primitive version.pdf (Size: 25.54 KB / Downloads: 8)
Find all posts by this user
Quote this message in a reply
04-10-2020, 01:18 PM
Post: #4
RE: (HP12C) infinite Yam's
The same listing for HP12C with included example
(Thank you for you practical note, rprosperi)


Attached File(s)
.pdf  HP12C - Yam's + example - lmaN for MoHPC - 20200410.pdf (Size: 35.89 KB / Downloads: 11)
Find all posts by this user
Quote this message in a reply
Post Reply 




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