Form1.Image2.Canvas.Ellipse ( FiveChess_Array[i,j].x1-2,
FiveChess_Array[i,j].y1-2,FiveChess_Array[i,j].x2-2,FiveChess_Array[i,j].y2-2);
FiveChess_array[i,j].state:=1;
Undo_i:=i;
Undo_j:=j;
Form1.Image2.Canvas.Brush.Color:=clred;
px1:= FiveChess_Array[i,j].x1+3;
py1:= FiveChess_Array[i,j].y1+3;
px2:= FiveChess_Array[i,j].x2-7;
py2:= FiveChess_Array[i,j].y2-7;
Form1.Image2.Canvas.Ellipse (px1,py1,px2,py2);
if Judge_Success_on_off(i,j, FiveChess_Array[i,j].state) then
begin
whitewin:=whitewin+1;
if whitewin>1 then
Application.MessageBox (''臭棋篓!比鱼头还臭!'',''胜败乃兵家常事'',0)
else
Application.MessageBox (''白方已胜利!'',''胜败乃兵家常事'',0);
form1.label9.caption:=inttostr(whitewin);
form1.Image2.Enabled :=false;
Form1.Timer1.Enabled := false;
end;
Result := true;
break;
end;
end;
end;
function Draw_Qizi_Black(X,Y : Integer): boolean;
var
i,j,x1,x2,y1,y2 : integer;
begin
result:=false;
for i:=0 to 14 do
for j:=0 to 14 do begin
if (X> FiveChess_Array[i,j].x1)and(X<FiveChess_Array[i,j].x2)
and (y> FiveChess_Array[i,j].y1)and(y<FiveChess_Array[i,j].y2)
and (FiveChess_Array[i,j].state=0) then
begin
if FiveChess_Array[Undo_i,Undo_j].state<>0 then begin
Form1.Image2.Canvas.Brush.Color:=Rgb(255,255,255);
Form1.Image2.Canvas.FillRect (Rect(px1,py1,px2,py2));
end;
Form1.Image2.Canvas.Brush.Color:=RGB(0,0,0);
Form1.Image2.Canvas.Ellipse ( FiveChess_Array[i,j].x1,
FiveChess_Array[i,j].y1,FiveChess_Array[i,j].x2,FiveChess_Array[i,j].y2);
Form1.Image2.Canvas.Brush.Color:=RGB(100,100,100);
Form1.Image2.Canvas.Ellipse ( FiveChess_Array[i,j].x1-2,
FiveChess_Array[i,j].y1-2,FiveChess_Array[i,j].x2-2,FiveChess_Array[i,j].y2-2);
FiveChes