310 GO SUB 580: REM mover pelot
a
320 PRINT AT oyb,oxb; INK 0;" "
330 PRINT AT yb, xb; INK 7
;"
A"
340
IF scd=0 THEN
G
O TO
290
350 PRINT AT
yb,
xb;
INK 0
; " "
360
G
O SUB
380
370 G
O TO
240
380 PRINT AT 0,11;
I
N K 1; z$ ( TO
2-
LEN
(
STR$
(s c 1») ;
s
c
1;
AT 0
,
30
;
INK 2;z$
(
10
2- L
EN
(
SIR$ (sc2»
));
s
c 2
390
RETURN
400 FOR
1=1
10
64
410 PRINT INK 5;e$;
420 NEXT 1
430
RE
TURN
440
LET
a
$= INKEY
$
450
IF
a
$="a " IHEN
LEI
p
(l)=-1
460
IF a$="
z"
THEN LET p
(lJ=2
470 IF comp=1 THEN LET p
(2 )=(2.
(y
(2
) <cyb »-(y
(2
»
(yb
» ):
G
O TO 500
480
IF a$
="k"
THEN LET p
(2 )
=-1
490 IF a$="rn" THEN
LET
p
(2
)=2
500 FOR i=1 TO 2
510 LET a= ATTR (y(1)+
p
(i ),x(i)
)
520
IF p(
i )=2
THEN LET p
(i
)=1
530
IF a
=32
THEN
PRINT
INK
0;
A
T y
( i
)
,x (i
)
;"
"; A
T
y
(1)
+1,
xCi);" "
.
LET y(i
) =y
(i
)+p(i
)
540
PRINT AT y
(i ) ,x (i
);
INK i
;
"
8"
;
A
T y(
i) +1,x( i
) ;
"8 "
550
LET
P
(
1)
=0
560
NEXT
i
570
RETURN
580
LET w= ATTR (yb+dy,xb+dx
)
590
IF w=
32
THEN LET
xb=xb+d x:
LET yb=yb
tdy
:
RET
URN
Capítulo
8.
Guía de pro
gramación
en +3 BASIC
334