uses graph, crt; var d,m,x,y,r,x1,y1,i,count:integer; points:string; s:string; begin clrscr; d:=detect; initgraph(d,m,' '); x:=50;y:=50;r:=10; randomize; setcolor(green); circle(x,y,r); i:=50; count:=0; repeat if i=300 then begin setcolor(black); circle(x1,y1,r); x1:=random(120)*5; y1:=random(80)*5; setcolor(red); circle(x1,y1,r); i:=0; end; i:=i+1; setcolor(black); s:=ReadKey; if (s='K') and (x>3) then begin x:=x-5; circle(x+5,y,r); end; if (s='M') and (x<600) then begin x:=x+5; circle(x-5,y,r); end; if (s='H') and (y>3) then begin y:=y-5; circle(x,y+5,r); end; if (s='P') and (y<400) then begin y:=y+5; circle(x,y-5,r); end; setcolor(green); circle(x,y,r); if (x=x1) and (y=y1) then begin count:=count+1; str(count,points); if count>0 then begin str(count-1, points); setcolor(black); outtextxy(10,10,'punkte on '+points); str(count, points); y1:=0; end; setcolor(green); outtextxy(10,10,'punkte on '+points); end; {write('punkte on ',count+1);} until (count=3) or (s=chr(27)); setcolor(green); outtextxy(100, 300,'TUBLI!!!'); readln; closegraph; end.