(71B) Cyber Tennis version 2 for HP-71B
09-05-2017, 03:24 AM (This post was last modified: 09-07-2017 12:20 PM by Gene.)
Post: #1 Namir Senior Member Posts: 638 Joined: Dec 2013
(71B) Cyber Tennis version 2 for HP-71B
The game assumes you are playing a 10-point match of cyber tennis. You play as many rounds until either you or the calculator wins 10 rounds. See instructions to play the game and to view the special new features (see steps 6, 7, and 8).

Memory Map

Code:
M9 = max range C9 = number of points to win C1 = wining counter for player C2 = wining counter for calculator V1 = round value for player V2 = round value for calculator R = random number V = round value

HP-71B Listing

Code:
10 REM CYBER TENNIS - 10-POINJT GAME 11 REM VERSION 2 20 M9= 100 @ C9=10 @C1 = 0 @ C2 = 0 30 R = PI 40 INPUT "ENTER NEW SEED? ", "";A$50 IF A$<>"" THEN R=VAL(A\$) 60 GOSUB 1000 @ V1=V @ IF R<0.01 THEN DISP "YOU RESET" @ WAIT 2 @ C1=0 70 GOSUB 1000 @ V2=V @ IF R<0.01 THEN DISP "CALC RESET" @ WAIT 2 @ C2=0 80 IF V1>V2 THEN C1=C1+1 @ DISP "YOU=";C1 @ WAIT 2 90 IF V2>V1 THEN C2=C2+1 @ DISP "CALC=";C2 @ WAIT 2 100 IF V1=V2 THEN DISP "TIE" @ WAIT 2 110 IF C1>=C9 THEN DISP "YOU WIN" @ GOTO 200 120 IF C2>=C9 THEN DISP "YOU LOSE" @ GOTO 200 130 IF R >= 0.99 THEN DISP "SUDDEN DEATH ON!" @ WAIT 2 @ C1=C9-1  C2=C1 140 GOTO 40 200 END 1000 R = (PI+R)^5 1010 R = R - INT(R) 1020 V = INT(M9*R) 1030 RETURN

Instructions

1) Press the [RUN] key.
2) The calculator prompts you to enter a new seed for the random number.
3) Optionally enter a new seed and press [ENTER]. You can simply do the latter to use the current random number.
4) If you win the current round, the program displays "YOU=" followed by you current total winnings. If you lose the current round, program displays "CALC=" followed by the calculator's current total winnings. If neither wins the current round, the program displays "TIE".
5) If you reached the maximum number of points to win, the program displays "YOU WIN". If the calculator has reached the maximum number of points to win, the program displays "YOU LOSE". The program stops if there is a winner.
6) If the random number is equal to or greater than 0.99, the game goes into sudden death mode. In these mode, both you and the calculator have each a score of 9. The next win of a round determines the winning party. The program displays the message "SUDDEN DEATH" to announce this special game mode.
7) If the random number used to calculate your score in a round, is less than 0.01, your current winnings score is reset to 0. The program displays the message "YOU RESET".
8) If the random number used to calculate the calculator's score in a round, is less than 0.01, the calculator's current winnings score is reset to 0. The program displays the message "CALC RESET".
9) Resume at step 4.
 « Next Oldest | Next Newest »

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