10REM Simon Game
20REM An attempt at 10-minute
30REM programming on a bad day
40REM (C) 1991 Bazzasoft
50*FX11,0
60PROCsetup
70REPEAT:MODE7:PROCinit
80MODE2:FORI=11TO14:VDU19,I,0;0;0;
90NEXT:GCOL0,11
100VDU23;8202;0;0;0;
110MOVE0,1024:MOVE640,1024:PLOT85,0,52
4:PLOT85,640,524
120MOVE640,1024:GCOL0,12:PLOT85,1280,1
024:MOVE640,524:PLOT85,1280,524:GCOL0,13
:MOVE640,524:PLOT85,1280,24:PLOT85,640,2
4:GCOL0,14:MOVE640,524:PLOT85,0,524:MOVE
640,24:PLOT85,0,24
130PRINTTAB(4,7);"A"TAB(15,7);"*"TAB(4
,23);"Z"TAB(15,23);"?"
140NS%=1:M%=&BFF
150M%?NS%=RND(4):PROCdel(50):PROCshow:
IF FNguess=0 PROClost ELSE NS%=NS%+1:GOT
O150
160UNTIL0
170DEFPROCinit:*FX21
180PRINTCHR$141;" Simple Simon - a qui
ck game..."'CHR$141;" Simple Simon - a q
uick game..."''" Please choose a difficu
lty level from 50 (possible) to 1 (imp
ossible)..."
190REPEAT:INPUTLINE" Level="SP%:SP%=IN
TSP%:UNTILSP%<51 AND SP%>0:ENDPROC
200DEFPROCsetup:ENVELOPE1,2,1,1,-2,1,1
,1,100,-120,0,-1,126,0:ENDPROC
210DEFPROCshow
220FORI%=1TONS%:PROCflash(M%?I%):NEXT:
ENDPROC
230DEFPROCflash(N%):SOUND1,-15,50+20*N
%,1:VDU19,N%+10,N%,0;0;0;:PROCdel(SP%):V
DU19,N%+10,0;0;0;:ENDPROC
240DEFPROCdel(SP%):T%=TIME+SP%:REPEATU
NTILTIME>T%:ENDPROC
250DEFFNguess:XZ%=0:REPEAT:XZ%=XZ%+1:T
%=TIME+100+SP%*4:REPEAT:Z%=FNkey:UNTIL Z
%>0 OR TIME>T%
260IFTIME>T% AND Z%=0 THENUNTIL1:=0
270RT%=SP%:SP%=20:PROCflash(Z%):SP%=RT
%:IFZ%<>M%?XZ% UNTIL1:=0
280UNTILXZ%=NS%
290=-1
300DEFFNkey
310IFINKEY-66 THEN =1
320IFINKEY-73 THEN =2
330IFINKEY-105 THEN =3
340IFINKEY-98 THEN =4
350=0
360DEFPROClost:SOUND1,1,25,1:SP%=10:PR
OCdel(100):PROCshow:ENDPROC