s_array[i,j].state := 2;
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
blackwin:=blackwin+1;
if blackwin>1 then
Application.MessageBox (''不会吧!难道比鱼头还臭!'',''胜败乃兵家常事'',0)
else
Application.MessageBox (''黑方已胜利!'',''胜败乃兵家常事'',0);
form1.label10.caption:=inttostr(blackwin);
form1.Image2.Enabled :=false;
Form1.Timer1.enabled := False;
end;
Result:=true;
break;
end;
end;
end;
procedure TForm1.Image2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Online = White then begin
if draw_Qizi_white(X,Y) then
Online := Black
end
else
if draw_Qizi_Black(X,Y) then
Online:=White;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Online:=white;
form1.Label11.Caption :=''人不到伤痕累累''#13+''就不会懂得后悔!'';
Start_Flag:=false;
Form1.Image2.Enabled := false;
end;
procedure TForm1.BitBtn3Click(Sender: TObject);
begin
form2.show;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if online=white then
whitetime:=whitetime +1
else
blacktime:=blacktime +1;
Form1.Label7.caption:=inttostr(whitetime);
Form1.Label8.caption:=inttostr(blacktime);
end;
procedure TForm1.Label11MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (Button = mbleft) and (ssShift in shift) And (form1.Image2.Enabled = true)then