unit Main;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, ComCtrls, Buttons, Graphics, mmsystem;
type
TForm1 = class(TForm)
StatusBar1: TStatusBar;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Panel1: TPanel;
Label1: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Label3: TLabel;
Label4: TLabel;
BitBtn3: TBitBtn;
Image1: TImage;
Image2: TImage;
Label5: TLabel;
Label2: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Timer1: TTimer;
Label11: TLabel;
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure Image2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Label11MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
FiveChess_Struct=record
x1 : integer;
y1 : integer;
x2 : integer;
y2 : integer;
state : byte;
end;
FiveChess_Data=array [0..14,0..14] of FiveChess_Struct;
Player = ( NON,White,Black);
var
Form1: TForm1;
Start_Flag : Boolean;
FiveChess_Array:FiveChess_Data ;
Online: player;
whitewin,blackwin:byte;
whitetime,blacktime:integer;
px1,px2,py1,py2 : integer;
Undo_i,Undo_j : integer;
function Ini_Main():Boolean ;
implementation
uses Option;
{$R *.DFM}
//{$R AOE.RES}
procedure Ini_FiveChess_Array();
var
i , j,k: integer;
begin
For i:=0 to 14 do begin
For j:=0 to 14 do begin
FiveChess_Array[i,j].x1:=16+25*j;
FiveChess_Array[i,j].y1:=16+25*i;
FiveChess_Array[i,j].x2:=36+25*j;
FiveChess_Array[i,j].y2:=36+25*i;
FiveChess_Array[i,j].state:=0;
end;
end;
end;
procedure Draw_qi