for ren:=1 to 3 do
for col:=0 to 4 do
begin
if arr[ren,col]=666 then
begin
if (arr[ren,col+1]<>666) and (col<=3) then arr[ren,col+1]:=arr[ren,col+1]+1;
if (arr[ren,1-1]<>666) and (col)=)2 then arr[ren,col-1]:=arr[ren,col-1]-1;
end;
end;
end;
if (arr[ren,1-1]<>666) and (col)=)2 then arr[ren,col-1]:=arr[ren,col-1]-1;
está mal hecha la condicion:
and (col)=)2
Deberia ser and (col=2) o (col >= 2) o (col <=2);
Si coriges eso, compila perfectamente.