9 B%=185:A%=370:X%=10:Y%=10
10 GELLOAD "up","up.gif"
20 GELLOAD "down","down.gif"
30 GELLOAD "left","left.gif"
40 GELLOAD "right","right.gif"
50 GELLOAD "poezd","poezd.gif"
60 GELLOAD "fon","fon.gif"
70 DRAWGEL "fon",0,0
80 SPRITEGEL "poezd","poezd"
90 IF LEFT(0) THEN SPRITEGEL "hero","left"
100 IF RIGHT(0) THEN SPRITEGEL "hero","right"
110 IF UP(0) THEN SPRITEGEL "hero","up"
120 IF DOWN(0) THEN SPRITEGEL "hero","down"
130 SPRITEMOVE "hero",X%,Y%
140 SPRITEMOVE "poezd",A%,B%
150 A%=A%-1
160 IF A%<=-70 THEN A%=A%+500
170 IF LEFT(0) THEN X%=X%-1
180 IF RIGHT(0) THEN X%=X%+1
190 IF UP(0) THEN Y%=Y%-1
200 IF DOWN(0) THEN Y%=Y%+1
210 IF SPRITEHIT("poezd","hero") THEN GOTO 1000
220 SLEEP 10
230 GOTO 90
1000 SETCOLOR 0,0,0
1010 FILLRECT 0,0,500,500
1020 SETCOLOR 255,0,0
1030 DRAWSTRING "ÊÎÍÅÖ ÈÃÐÛ",120,100
1040 DRAWSTRING "ÏÎÄÎÆÄÈÒÅ",120,150
1050 CLS:GOTO 9
