04-23-2018, 11:37 AM
I just read some older posts in the HP41 Software Library and I found Namir's "Cyber Tennis Game for HP-41C". So I thought I could do something similar for the good old HP67/97:
Usage:
Enter a seed (between 0 and 1) for the random number generator and press [E].
This starts a new match.
A new match can also be started by pressing [A]. This does not change the random seed.
Press [B] to play the next point.
The score is displayed as yy.cc where yy is your score and cc the calculator's.
Note: After having started with [E] or [A] you may also simply press [R/S] to play the next point.
The match is won as soon as one of the players reaches 10 points and his score is higher by at least two points. This can be modified by changing the numbers in line 022 (more than 9 points to win) and 030 (at least 2 points ahead required).
If you try a seed of 0,123 you will see a quite exciting match. ;-)
The program has less than 50 lines, so a version for a lower end calculator – maybe the 12C – should not be too difficult. ;-)
Dieter
Code:
001 LBL E
002 ABS
003 FRAC
004 STO 0
005 LBL A
006 CLX
007 STO 1
008 STO 2
009 GTO 1
010 LBL B
011 RCL 0
012 Pi
013 +
014 x^2
015 FRAC
016 STO 0
017 2
018 *
019 STO I
020 ISZ
021 ISZ(i)
022 9
023 RCL(i)
024 X<=Y?
025 GTO 1
026 RCL 1
027 RCL 2
028 -
029 ABS
030 2
031 X>Y?
032 GTO 1
033 GSB 1
034 PAUSE
035 PAUSE
036 RTN
037 GTO A
038 LBL 1
039 FIX
040 DSP 2
041 RCL 1
042 RCL 2
043 EEX
044 2
045 /
046 +
047 RTN
048 GTO B
Usage:
Enter a seed (between 0 and 1) for the random number generator and press [E].
This starts a new match.
A new match can also be started by pressing [A]. This does not change the random seed.
Press [B] to play the next point.
The score is displayed as yy.cc where yy is your score and cc the calculator's.
Note: After having started with [E] or [A] you may also simply press [R/S] to play the next point.
The match is won as soon as one of the players reaches 10 points and his score is higher by at least two points. This can be modified by changing the numbers in line 022 (more than 9 points to win) and 030 (at least 2 points ahead required).
If you try a seed of 0,123 you will see a quite exciting match. ;-)
Code:
0,123 [E] 0.00
[B] 0.01
[B] 1.01
[B] 1.02
[B] 2.02
[B] 2.03
[B] 3.03
[B] 3.04
[B] 3.05
[B] 3.06
[B] 4.06
[B] 4.07
[B] 4.08 looks like you've lost
[B] 4.09 matchpoint for calculator
[B] 5.09
[B] 6.09
[B] 7.09
[B] 8.09 you've almost caught up!
[B] 9.09
[B] 10.09 matchpoint for you
[B] 10.10
[B] 10.11 matchpoint for calculator
[B] 11.11
[B] 11.12 matchpoint for calculator
[B] 12.12
[B] 13.12 matchpoint for you
[B] "14.12"
"14.12"
14.12 you won -- what a match!
The program has less than 50 lines, so a version for a lower end calculator – maybe the 12C – should not be too difficult. ;-)
Dieter