(12C) Twenty-One (aka Blackjack) - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (12C) Twenty-One (aka Blackjack) (/thread-20291.html) |
(12C) Twenty-One (aka Blackjack) - Peet - 08-09-2023 01:41 PM I've noticed that the programming capabilities of the HP12c are very similar to my first programmable calculator from the 1970's, the Commodore PR100. So I converted some small programs from that time. One of my favorite calculator games back then was Twenty-One, which seems perfect for the HP12C. Code:
Twenty-One (aka Blackjack) Usage: <R/S> = hit/card, <1> <R/S> = stand/hold (bank draws) The display shows the new card value, blinks and shows the total of all cards. If the total is higher than 21, the player/bank loses. Player wins a round if he scores the same or more than the bank. Display of e.g. 3.2 means player won 3 rounds so far, bank 2. The game ends if bank loses 9 times, then you must start a new game. REG 0 - random REG 1 - player REG 2 - bank REG 3 - counter REG 5 - target RE: (12C) Twenty-One (aka Blackjack) - Eddie W. Shore - 08-09-2023 07:51 PM This code is amazing. RE: (12C) Twenty-One (aka Blackjack) - Peet - 08-10-2023 08:46 PM Who says a financial calculator can't be fun |