Реферат: Решение задачи о кратчайшем маршруте
for i:=1 to yyy-1 do
for j:=1 to xxx do
begin
pixel(j*2+xx1,i*3+yy1,col[fire1[i,j]]);
pixel(j*2+xx1,i*3+yy1-1,col[fire1[i,j]]);
pixel(j*2+xx1,i*3+yy1-2,col[fire1[i,j]]);
end ;
for j:=1 to xxx do
begin
kk:=random(8);
if kk<3 then fire1[yyy,j]:=16
else fire1[yyy,j]:=round(31-kk);
end ;
for i:=yyy-1 downto 1 do
for j:=2 to xxx-1 do
begin
fire2[i,j]:=round((fire1[i+1,j]+fire1[i+1,j-1]+fire1[i+1,j+1]-random(4))/3);
if (fire2[i,j]<16) or (fire2[i,j]>31) then fire2[i,j]:=16;
end ;
for i:=1 to yyy do
for j:=1 to xxx do
fire1[i,j]:=fire2[i,j];
end ;
PROCEDURE ok;
begin
cleardevice;
setcolor(1);
rectangle(120,100,520,220);
rectangle(100,120,540,200);