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