(41) Game of Roulette - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP-41C Software Library (/forum-11.html) +--- Thread: (41) Game of Roulette (/thread-17267.html) |
(41) Game of Roulette - Gene - 07-20-2021 06:09 PM From: 65 Notes V3N9P20 by Craig Pearce. Register usage: 00 - unused 01 - unused 02 - player's total 03 - bank balance 04 - player bet 05 - winning number from spin of wheel 06 - player guess 07 - decimal seed Instructions: 1) XEQ SPIN 2) Enter a 6 digit plus decimal seed at SEED? prompt between 0 and 1. Press R/S. 3) At BANK? prompt, enter amount of money held by the bank / house you are trying to win and press R/S. 4) At BET $? prompt, key how much you are betting per spin and press R/S. Valid entries are 0 through 37. The number 37 stands for the 00 place on the wheel. 5) Enter guess and press A to spin. 6) Display shows the number spun and how much you have won or lost in total. If you lose, the the amount of your bet is taken away from your winnings - if any! If you win, 35x the amount of your bet is added to your winnings. Of course, since there are 37 possible outcomes and you only get 35x added for a winning bet, the odds are in favor of the bank / house! 7) Go back to step 5. Sample game: XEQ SPIN SEED? 0.123456789 R/S BANK? 25000 R/S BET $? 100 R/S 5 A and see #=3 $-100 --- so the number was 3 and I've lost $100. Easy come, easy go. 6 A and see #=6 $3400 so the number was 6 and I now have $3400. (35x$100 = $3500 less the previous $100 loss). Woohoo! 20 A and see #=32 $3300, so I have lost again. and so on. Enhancements I would like to see: I'd like to see the numbers 00 through 37 rapidly flicker through the display while the spin is occurring to mimic the wheel. Note: The # character on line 18 was entered synthetically. If you don't want to use it use "Num=" or something else. :-) Code: 01◆LBL "SPIN" |