SETUP:

CLS

SCREEN 12

SLEEP 240

DIM X AS INTEGER,Y AS INTEGER, BUTTONS AS INTEGER

DIM STATUS(200)

DIM SEQ(200)

CIRCLE (300,150),50,4

CIRCLE (200,250),50,2

CIRCLE (400,250),50,3

CIRCLE (300,350),50,7

LENGTHOFSEQUENCE=5

B$=""

A$=""

GAME:

GOSUB MAKESEQUENCE

LOCATE 25,25:PRINT A$

LOCATE 26,25:PRINT B$

SLEEP 500

DO

A$=INKEY$

IF A$=CHR$(255)+"X" THEN SYSTEM

IF A$=CHR$(27) THEN SYSTEM

GETMOUSE X,Y,,BUTTONS

IF X>249 AND X<351 AND Y>101 AND Y<201 AND BUTTONS=1 THEN B$=B$+"T":GOSUB TOPLIGHT

IF X>149 AND X<251 AND Y>200 AND Y<302 AND BUTTONS=1 THEN B$=B$+"L":GOSUB LEFTLIGHT

IF X>349 AND X<451 AND Y>200 AND Y<302 AND BUTTONS=1 THEN B$=B$+"R":GOSUB RIGHTLIGHT

IF X>249 AND X<351 AND Y>298 AND Y<402 AND BUTTONS=1 THEN B$=B$+"B":GOSUB BOTTOMLIGHT

IF A$=B$ THEN EXIT DO

LOOP

LOCATE 24,25:PRINT "EXITED"

SLEEP 500

LENGTHOFSEQUENCE=LENGTHOFSEQUENCE+1

A$=""

B$=""

GOTO GAME

LOSE:

LOCATE 25,25:PRINT "SORRY"

SLEEP 300

GOSUB GAME

MAKESEQUENCE:

FOR T=1 TO LENGTHOFSEQUENCE

SEQINT=INT(RND(1)*5)

IF SEQINT=1 THEN A$=A$+"T":GOSUB TOPLIGHT

IF SEQINT=2 THEN A$=A$+"B":GOSUB BOTTOMLIGHT

IF SEQINT=3 THEN A$=A$+"L":GOSUB LEFTLIGHT

IF SEQINT=4 THEN A$=A$+"R":GOSUB RIGHTLIGHT

IF SEQINT=5 THEN A$=A$+"T":GOSUB TOPLIGHT

NEXT T

RETURN

TOPLIGHT:

FOR R=49 TO 1 STEP-1

CIRCLE (300,150),R,4

NEXT R

SLEEP 160

FOR R=49 TO 1 STEP-1

CIRCLE(300,150),R,0

NEXT R

RETURN

BOTTOMLIGHT:

FOR R=49 TO 1 STEP-1

CIRCLE (300,350),R,7

NEXT R

SLEEP 160

FOR R=49 TO 1 STEP-1

CIRCLE(300,350),R,0

NEXT R

RETURN

LEFTLIGHT:

FOR R=49 TO 1 STEP-1

CIRCLE (200,250),R,2

NEXT R

SLEEP 160

FOR R=49 TO 1 STEP-1

CIRCLE(200,250),R,0

NEXT R

RETURN

RIGHTLIGHT:

FOR R=49 TO 1 STEP-1

CIRCLE (400,250),R,3

NEXT R

SLEEP 160

FOR R=49 TO 1 STEP-1

CIRCLE(400,250),R,0

NEXT R

RETURN