10
|
|
REM ZX81 REM "DY SHOTS":
|
---|
20 |
|
LET B=3
|
---|
30 |
|
LET D=B
|
---|
40 |
|
LET A=B-B
|
---|
50 |
|
LET T=INT(RND*30+14)
|
---|
60 |
|
PLOT 63, T
|
---|
70 |
|
FOR Y=1 T0 43
|
---|
80 |
|
PLOT A, Y
|
---|
90 |
|
UNPLOT A, Y-1
|
---|
100 |
|
IF INKEY$<>"" THEN GOTO 140
|
---|
110 |
|
NEXT Y
|
---|
120 |
|
PRINT AT 20,8; "TOO LATE!"
|
---|
130 |
|
GOTO 270
|
---|
140 |
|
UNPLOT A, Y
|
---|
150 |
|
FOR X=0 T0 43 STEP B
|
---|
160 |
|
LET Y=Y+(INKEY$="7") - (INKEY$="6")
|
---|
170 |
|
PLOT X, Y
|
---|
180 |
|
UNPLOT X-B, D
|
---|
190 |
|
LET D=Y
|
---|
200 |
|
NEXT X
|
---|
210 |
|
IF Y=T THEN GOTO 260
|
---|
220 |
|
LET T = T + SIGN(Y-T)
|
---|
230 |
|
IF Y=T THEN PRINT AT 20,8; "WELL DONE!"
|
---|
240 |
|
IF Y<>T THEN PRINT AT 20,8; "MISSED!"
|
---|
250 |
|
GOTO 10
|
---|
260 |
|
PRINT AT 20,8; "PERFECT SHOT!"
|
---|
270 |
|
FOR I=1 T0 20
|
---|
280 |
|
NEXT I
|
---|
290 |
|
CLS
|
---|
300 |
|
RUN
|
---|