Вот что я сделал.
program ems;
uses crt;
var
c:char;
x,y:byte;
begin
clrscr;
randomize;
x:=random(40);
y:=random(50);
gotoxy(x,y);
textcolor(12);
write('K');
gotoxy(40,14);
repeat
c:=readkey;
case c of
#72:begin gotoxy(whereX-1,whereY); textcolor(0); write('x'); textcolor(15); gotoxy(whereX-1,whereY-1); write('x'); end;
#80:begin gotoxy(whereX-1,whereY); textcolor(0); write('x'); textcolor(15); gotoxy(whereX-1,whereY+1); write('x'); end;
#77:begin gotoxy(whereX-1,whereY); textcolor(0); write('x'); textcolor(15); gotoxy(whereX,whereY); write('x'); end;
#75:begin gotoxy(whereX-1,whereY); textcolor(0); write('x'); textcolor(15); gotoxy(whereX-2,whereY); write('x'); end;
end;
until c=#27;
end.
М | 1 Название темы должно быть информативно, учти на будущее (я изменил его). 2. Пользуйся тегами (я вставил) --- Lapp |