logo search
Диссертация_2013_Даулбаева ММ

Продолжение приложения б

begin

if (vert = 1) then y := plan.Width-1

else x := 0;

while (x < plan.Width) and (y >= 0) { plan.Height) } and (not flag) do

begin

if (plan.Arr[x,y] <> 0) and (a.Arr[x,y] = 0) then

begin

a.Arr[x,y] := val;

if (x = x_m) and (vert = 0) then

flag := true;

end;

if (vert = 1) then dec(y)

else inc(x);

end;

end;

procedure Find( var x, y: integer; vert, val: integer );

begin

if (vert = 1) then y := 0

else x := 0;

while (x < plan.Width) and (y < plan.Height) do

begin

if a.Arr[x,y] = val then

break;

if (vert = 1) then inc(y)

else inc(x);

end;

end;

var

index, index2, x1, y1: integer;

path: array [0..100] of TPoint;

begin

FillChar( path, sizeof(path), 0 );

x_m := -1;

y_m := -1;

v_m := MaxInt;

for index := 0 to plan.Height-1 do