源码如下:
function Tmainform.IsWin(IsBlack:boolean):boolean;
label exit1;
var
i,j:integer;
wtag:integer;
Tag:array[0..18,0..18]of integer;
begin
IsWin:=false;
if IsBlack then
wtag:=1 else
wtag:=2;
for i:=0 to 18 do
for j:=0 to 14 do
begin
{是否有行连成}
if (i<15)
and(Tag[i,j]=wtag)
and(Tag[i+1,j]=wtag)
and(Tag[i+2,j]=wtag)
and(Tag[i+3,j]=wtag)
and(Tag[i+4,j]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
i,j的值为多少时Tag[i,j]=wtag成立?