program liikumine; uses crt,graph; var x, y,d,m: integer; s: string; procedure kirjuta(kx, ky: integer); begin { gotoxy(kx, ky );}{outtextxy (kx,ky,'*');} {gotoxy(kx, ky+1); writeln('* * * '); gotoxy(kx, ky+2); writeln(' * ');} putpixel(kx,ky,1); end; begin textbackground(0); clrscr; d:=detect; initgraph(d, m, ''); setbkcolor(5); x:=15; y:=10; kirjuta(x, y); repeat s:=ReadKey; kirjuta(x, y); if s=chr(0) then begin s:=readkey; if (s='K') and (x>3) then x:=x-2; if (s='M') and (x<600) then x:=x+2; if (s='H') and (y>3) then y:=y-2; if (s='P') and (y<450) then y:=y+2; end; kirjuta(x,y); until s=chr(27); TextMode(LastMode); end.