Uses Graph,crt;
VAR
x1, y1, x2, y2:integer;
GraphDriver,GraphMode:integer;
procedure L(x1, y1, x2, y2:word);
begin
SetColor(17);
Line (x1, y1, x2, y2);
end;
Begin
randomize;
GraphDriver:=detect;
InitGraph(GraphDriver, GraphMode, '');
repeat
delay(49999);
SetBkColor(random(16));
x1:=200; y1:=100; x2:=500; y2:=100; L (x1, y1, x2, y2);
x1:=500; y1:=100; x2:=500; y2:=400; L (x1, y1, x2, y2);
x1:=500; y1:=400; x2:=200; y2:=400; L (x1, y1, x2, y2);
x1:=200; y1:=400; x2:=200; y2:=100; L (x1, y1, x2, y2);
x1:=200; y1:=250; x2:=350; y2:=100; L (x1, y1, x2, y2);
x1:=350; y1:=100; x2:=500; y2:=250; L (x1, y1, x2, y2);
x1:=500; y1:=250; x2:=350; y2:=400; L (x1, y1, x2, y2);
x1:=350; y1:=400; x2:=200; y2:=250; L (x1, y1, x2, y2);
x1:=275; y1:=250; x2:=350; y2:=175; L (x1, y1, x2, y2);
x1:=275; y1:=250; x2:=350; y2:=325; L (x1, y1, x2, y2);
x1:=350; y1:=325; x2:=425; y2:=250; L (x1, y1, x2, y2);
x1:=425; y1:=250; x2:=350; y2:=175; L (x1, y1, x2, y2);
x1:=200; y1:=175; x2:=275; y2:=175; L (x1, y1, x2, y2);
x1:=275; y1:=175; x2:=275; y2:=100; L (x1, y1, x2, y2);
x1:=425; y1:=100; x2:=425; y2:=175; L (x1, y1, x2, y2);
x1:=425; y1:=175; x2:=500; y2:=175; L (x1, y1, x2, y2);
x1:=200; y1:=325; x2:=275; y2:=325; L (x1, y1, x2, y2);
x1:=275; y1:=325; x2:=275; y2:=400; L (x1, y1, x2, y2);
x1:=425; y1:=400; x2:=425; y2:=325; L (x1, y1, x2, y2);
x1:=425; y1:=325; x2:=500; y2:=325; L (x1, y1, x2, y2);
until KeyPressed;
read(x1);
CloseGraph;
End.
графика, помогите сделать движение |