Source Code
5 REM PROGRAM TAG
10 BORDER 0: PAPER 0: CLS
20 LET X=15
30 LET Y=11
40 LET A=0
50 LET B=0
60 PRINT AT A,B;"\'."
70 PRINT AT Y,X; INK INT (RND*7)+1;"\ "
80 FOR N=1 TO 17
90 NEXT N
100 PRINT AT Y,X; INK 0;""
110 PRINT AT A,B; INK 0;""
120 LET C=INT (RND*4)+1
130 IF C=1 AND X<=29 THEN LET X=X+2
140 IF C=2 AND X>=2 THEN LET X=X-2
150 IF C=3 AND Y<=19 THEN LET Y=Y+2
160 IF C=4 AND Y>=2 THEN LET Y=Y-2
170 IF INKEY$="O" AND B>=1 THEN LET B=B-1
180 IF INKEY$="A" AND A<=20 THEN LET A=A+1
190 IF INKEY$="Q" AND A>=1 THEN LET A=A-1
200 IF INKEY$="P" AND B<=30 THEN LET B=B+1
210 IF A=Y AND B=X THEN GO TO 900
220 PRINT AT Y,X; BRIGHT 1; INK INT (RND*6)+2;"\ "
230 PRINT AT A,B; INK 7;"\'."
240 GO TO 80
900 FOR N=1 TO 50: PRINT AT 0,0; PAPER 7; INK 2;"YOU WON!"
910 BORDER 0
920 PRINT AT A,B; BRIGHT 1; INK INT (RND*6)+2; FLASH 1;"\'."
930 PRINT AT A,B; INK 7; FLASH 1;"\'."
940 BORDER 2
950 NEXT N
960 PAUSE 1000: STOP