Курсовая работа: Разработка алгоритма и реализация игры "Реверси"
end
else
begin
wc1:= 1;
wc2:= 2;
end;
if brd[cy, cx]<> 0 then begin result:= 0; exit; end;
passed:= FALSE;
test:= FALSE;
for i:=cx-1 downto 0 do // Check left
begin
if brd[cy, i] = wc1 then test:= TRUE
else
if ((brd[cy, i] = wc2) and (test)) then
begin
passed:= TRUE;
for j:=cx-1 downto i+1 do inc(total);
for j:=cx-1 downto i+1 do brd2[cy, j]:= wc1; ////???????
break;
end
else break;
end;
test:= FALSE;
for i:=cx+1 to 7 do // Check Right
begin
if (brd[cy, i] = wc1) then test:= TRUE
else
if ((brd[cy, i] = wc2) and test) then
begin