uses crt, graph;
var xe,x1,ye,y1,x2,y2, device, mode:integer;
begin
clrscr;
device:=0;
InitGraph(Device,Mode,'D:\Users\biostar\Downloads\tp7.scp.1.3.1\pak\BP');
DirectVideo:=false;
xe:=585; ye:=50;
repeat
SetColor(white);
Ellipse(xe,ye,0,360,50,20);
Delay(20);
SetColor(black);
Ellipse(xe,ye,0,360,50,20);
xe:=xe-1;
if KeyPressed then begin
x1:=300; y1:=450; x2:=300; y2:=400;
repeat
SetColor(White);
Ellipse(xe,ye,0,360,50,20);
Line(x1,y1,x2,y2);
Delay(20);
SetColor(black);
Ellipse(xe,ye,0,360,50,20);
Line(x1,y1,x2,y2);
Delay(20);
xe:=xe-1;
y2:=y2-2;
y1:=y1-2;
if y1<=ye+20 then begin
SetColor(red);
Ellipse(xe,ye,0,360,50,20);
Line(x1,y1,x2,y2);
end;
until y1<0;
end;
until xe<0;
CloseGraph;
end.