mirror of
https://github.com/mbirth/gwbasic.git
synced 2024-11-14 01:06:45 +00:00
23 lines
520 B
QBasic
23 lines
520 B
QBasic
|
10 CLS
|
|||
|
20 KEY OFF
|
|||
|
30 A=1:B=1:X=1:Y=1
|
|||
|
40 LOCATE A,B:PRINT"<22>";
|
|||
|
50 H=0
|
|||
|
60 C=STICK(0):D=STICK(1):E=STRIG(0):F=STRIG(4)
|
|||
|
70 IF C<90 THEN Y=Y-1
|
|||
|
80 IF C>120 THEN Y=Y+1
|
|||
|
90 IF D<100 THEN X=X-1
|
|||
|
100 IF D>120 THEN X=X+1
|
|||
|
110 IF X<1 THEN X=1
|
|||
|
120 IF X>25 THEN X=25
|
|||
|
130 IF Y<1 THEN Y=1
|
|||
|
140 IF Y>80 THEN Y=80
|
|||
|
150 IF E=-1 AND F=-1 THEN COLOR H:H=H+1:I=1:IF H>31 THEN H=0
|
|||
|
160 IF I=1 THEN I=0:GOTO 180
|
|||
|
170 IF F=-1 THEN CLS
|
|||
|
180 IF E=-1 THEN 210
|
|||
|
190 LOCATE A,B:PRINT" ";
|
|||
|
200 A=X:B=Y
|
|||
|
210 LOCATE X,Y:PRINT"<22>";
|
|||
|
220 GOTO 60
|
|||
|
|