Post Reply 
(50G) RPSSL (Rock Paper Scissors Spock Lizard)
04-16-2017, 06:51 PM (This post was last modified: 06-15-2017 01:38 PM by Gene.)
Post: #1
(50G) RPSSL (Rock Paper Scissors Spock Lizard)
Everybody knows the ancient game of "Rock, Paper, Scissors" which even has its own Wikipedia page. Almost as well known is the much newer 5-weapon version called "Rock Paper Scissors Spock Lizard" (aka RPSSL), invented by Sam Kass and Karen Bryla. The simple rules are on its official website.

Here's a surprisingly short HP 50g program that plays RPSSL, user against calculator, complete with the official winning messages!

Note: "SCISSORS DECAPITATE LIZARD" has been changed to "SCISSORS STAB LIZARD" to fit the display.

(1) Run RPSSL. See "PICK ONE!" at the top of the screen. The soft menu keys are now labeled ROCK, PAPER, SCISSORS, SPOCK, LIZARD, and EXIT.
(2) Choose a weapon by pressing it. The calculator immediately chooses its weapon (without looking at yours!) and displays the result of the match, e.g. "YOU: SPOCK. ME: LIZARD. LIZARD POISONS SPOCK. I WIN!"
(3) Repeat step 2 until you are sufficiently entertained.
(4) Press the EXIT soft menu key to exit and return the menu to its previous contents.

%%HP: T(3)A(R)F(.);
WHILE -1 WAIT 10.1 - DUP 5 \<=
  " ME: " SWAP + 2 DISP DUP2 SAME { DROP2 "TIE!" "" 4 DISP }
  ROT GET SWAP GET " " + SWAP + " " SWAP + + 4 DISP "YOU" "I" IFTE " WIN!" + } IFTE 6 DISP

BYTES without name: 546.0 #3BA8h

Note: Originally posted on comp.sys.hp48 on 12 March 1998 for the HP 48.

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

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