1 gg "buf",0,0,10,10 2 sc 0,0,0 3 fr 0,0,150,150 11 wirina%=gw("buf"):vysota%=gh("buf") 12 sg "1","buf":sg "2","buf" 13 x1%=0:y1%=0 15 sm "2",100,100 100 if left(0) th x1%=x1%-5:if x1%<100+wirina% and x1%+wirina%>100 and y1%<100+vysota% and y1%+vysota%>100 th x1%=x1%+5 101 if right(0) th x1%=x1%+5:if x1%<100+wirina% and x1%+wirina%>100 and y1%<100+vysota% and y1%+vysota%>100 th x1%=x1%-5 102 if down(0) th y1%=y1%+5:if x1%<100+wirina% and x1%+wirina%>100 and y1%<100+vysota% and y1%+vysota%>100 th y1%=y1%-5 103 if up(0) th y1%=y1%-5:if x1%<100+wirina% and x1%+wirina%>100 and y1%<100+vysota% and y1%+vysota%>100 th y1%=y1%+5 104 if fire(0) th stop 105 sm "1",x1%,y1% 110 repaint:sleep 200:goto 100