SCREEN 13
RANDOMIZE TIMER
LINE (1, 194)-(320, 194), 2
X = 1
DIM CX(20), CY(20), DIR(20)
C = 50
CO = 5
L = 15
FOR K = 1 TO 20
CX(K) = INT(RND * 300) + 19
CY(K) = 15
NEXT K
LINE (0, 195)-(319, 199), 14, BF
Y = 193
DO
LOCATE 1, 1
PRINT L
GOSUB MCOM
K$ = INKEY$
K$ = RIGHT$(K$, 1)
IF K$ = "K" AND J = 0 THEN X = X - 1
IF K$ = "K" AND J > 0 THEN X = X - 3
IF K$ = "M" AND J = 0 THEN X = X + 1
IF K$ = "M" AND J > 0 THEN X = X + 3
IF K$ = " " AND J = 0 THEN J = 1: JT = 18
IF J = 1 THEN JT = JT - 1: Y = Y - 1: IF JT = 0 THEN J = 2: JT = 18
IF J = 2 THEN JT = JT - 1: Y = Y + 1: IF JT = 0 THEN J = 0
IF X = 0 THEN X = 320
IF X >= 321 THEN PRINT "YOU WON": END
FOR K = 1 TO 6000: NEXT K
LINE (1, 193)-(320, 193), 0
PSET (X, Y)
GOSUB CACC
D = INT(RND * C) + 1
IF D = 5 THEN P = INT(RND * 320) + 1: CO = CO + 1
IF CO = 21 THEN CO = 20
IF L = 0 THEN PRINT "YOU LOST": FOR K = 1 TO 100000: NEXT K: END
LOOP
MCOM:
FOR K = 1 TO 20
IF CX(K) = 0 THEN DIR = 1
IF CX(K) = 320 THEN DIR = 0
IF DIR(K) = 0 THEN CX(K) = CX(K) - 1: CY(K) = CY(K) + 1
IF DIR(K) = 1 THEN CX(K) = CX(K) + 1: CY(K) = CY(K) + 1
IF CX(K) = 0 THEN CX(K) = 319
IF POINT(CX(K), CY(K) + 1) = 14 THEN LINE (CX(K), CY(K))-(CX(K) + 3, CY(K) + 3), 0, BF: CX(K) = INT(RND * 300) + 19: CY(K) = 15
NEXT K
LINE (1, 1)-(320, 192), 0, BF
FOR K = 1 TO CO
LINE (CX(K), CY(K))-(CX(K) + 3, CY(K) + 3), , BF
LINE (CX(K), CY(K) - 1)-(CX(K) + 4, CY(K) - 1), 0
LINE (CX(K) + 4, CY(K) - 1)-(CX(K) + 4, CY(K) + 3), 0
NEXT K
RETURN
CACC:
FOR K = 1 TO CO
IF X = CX(CO) AND CY(CO) = 191 THEN L = L - 1: IF L = 0 THEN DO: PRINT "YOU LOST": LOOP UNTIL INKEY$ <> "": FOR K = 1 TO 10000: NEXT K: END
NEXT K
IF POINT(X, Y + 1) = 14 THEN
L = L - 1
DO
X = X + 1: Y = 193
LOOP UNTIL POINT(X, Y + 1) <> 0
DO: LOOP UNTIL INKEY$ <> ""
END IF
IF POINT(X, Y + 1) = 0 AND J = 0 THEN PSET (X, Y), 0: Y = Y + 1
RETURN
COML: