20 - SIMON (aka Senso)

Post Reply
Peet
Posts: 91
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

20 - SIMON (aka Senso)

Post by Peet »

HP41 Users Library - Games (modified).
Changes (among others): Local label instead of global, repeating sequence by default, leading zero prevention
SF 00 -> new sequence with every new number (no repeating sequence)

Usage: XEQ "SENSO"
"MAX?" <max. lenght of sequence> R/S
Display: sequence of numbers
Display: NUMBERS?
Input: repeat sequence R/S

Code: Select all

LBL "SENSO"
FIX 0
CF 29
LBL 08
CF 06
XEQ 09
"MAX?"
PROMPT
1 E3
/
1
+
STO 01
CLX
STO 02
LBL 10
RCL 01
INT
XEQ 07
XEQ 02
XEQ 05
FS? 05
GTO 04
"YES: "
ARCL X
AVIEW
PSE
ISG 01
GTO 10
FS?C 06
GTO 01
BEEP
"WELL DONE"
PROMPT
GTO 08
LBL 02
RCL 01
INT
STO 03
RCL 00
FRC
LBL 03
10
*
INT 
VIEW X
TONE IND X
LASTX
FRC
DSE 03
GTO 03
RTN
LBL 04
SF 06
TONE 2
TONE 0
"NO: " 
ARCL X
AVIEW
PSE
"NOT: " 
ARCL Y
AVIEW
PSE 
1
ST+ 02
ISG 01
GTO 10
LBL 01
CLA
ARCL 02
"|- NOT OK"
CF 06
PROMPT
GTO 08
LBL 05
CLST
"NUMBERS?"
PROMPT
CF 05
RCL 00
RCL 01
INT
10^X
*
INT
X=Y?
RTN
SF 05
RTN
LBL 07
FC? 00		; if SF 00 then start every time with a new sequence
RTN
LBL 09
XEQ "ZZ"	; XEQ "ZZ" (Basics), XROM 26,36 (TRNG - DM41X), XROM 01,49 (RAN - DM42)
.1
x<=Y?
CLX
+		; if ZZ <= 0.1 then increase by 0.1 so that the sequence does not start with 0
STO 00
END
Attachments
20_SIMON_Senso.raw
(196 Bytes) Downloaded 6 times
My programmable calculators - former: CBM PR100, HP41CV, HP28S, HP11C - current: HP48G(+), HP35S, DM41X, DM42
Post Reply