Hi, i wonder what is the best way to create movement paths for shapes (Roads, in which shapes will be moving to). I tried using this code, which is working, but it is a little bit confusing:


procedure TForm1.Timer1Timer(Sender: TObject);
begin //starting location x=424, y=192
if shape1.top=120 then // if y=120 then
begin
shape1.Top:=shape1.Top; //stop moving to top
if shape1.left=296 then //if x=296 then
begin
shape1.Left:=shape1.Left; //stop moving to left
end else shape1.Left:=shape1.Left-8; //else move x=x-8
end else shape1.Top:=shape1.Top-8; //else move y=y-8
end;

But imagine how confusing and hard it would be if somebody wanted to create more starting points. So do you know any better way than this?
Thanks