📄 fangmain.h
字号:
//---------------------------------------------------------------------------
#ifndef FangMainH
#define FangMainH
#include <Registry.hpp>
#include <ExtCtrls.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Buttons.hpp>
#include <StdCtrls.hpp>
//---------------------------------------------------------------------------
enum emMove {mvLeft,mvRight,mvDown,mvRound,mvFastDown,mvUp};
class TForm1 : public TForm
{
__published: // IDE-managed Components
TPanel *Panel1;
TTimer *timXia;
TSpeedButton *SpeedButton1;
TLabel *Label1;
TLabel *Label2;
TLabel *Label3;
TLabel *Label4;
TPanel *Panel2;
TSpeedButton *spbtnLeft;
TSpeedButton *spbtnRound;
TSpeedButton *spbtnRight;
TSpeedButton *spbtnDown;
TPanel *Panel3;
TPanel *Panel4;
TLabel *Label6;
TLabel *Label5;
TSpeedButton *SpeedButton6;
TSpeedButton *SpeedButton7;
TSpeedButton *SpeedButton8;
TBevel *Bevel1;
void __fastcall timXiaTimer(TObject *Sender);
void __fastcall SpeedButton1Click(TObject *Sender);
void __fastcall SpeedButton7Click(TObject *Sender);
void __fastcall MoveKeyDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall SpeedButton8Click(TObject *Sender);
void __fastcall SpeedButton6Click(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
private:
TPoint intTemp1[5];
int intYang[2][5];
int intYangShi;
TShape * FangKuai[5];
bool Guan;
void Xuan(int intYang[2][5]);
void __fastcall MyKeyDown(Messages::TMessage & Message);
void XuanYang(int intXuan[2][5],int XuanZhuan);
bool JianCha();
int intXuan1;
int intYangShi1;
int JuShu;
int intKuaiCount;
void NewMove(emMove Xiang,int step=1);
void KaiShi();
void ReadModel(int intModel);
void YangShi(int & ModeNo,int & RoundNo);
void ChuFangKuai();
int intXuan;
int intWei;
TRegistry *MyReg;
TColor clBrushKuai1;
TColor clBrushKuai2;
bool blMsgOk;
int JiFen;
int JiFen1;
bool JianCha1();
int NewMove1(emMove Xiang1,TPoint pntPos[5],int TempYang[2][5],int step );
void XiaZai(TWinControl *Parent1,int xPOs,int yPos,int H,TColor MyColor);
const int StartPosX,StartPosY,KUAN,GAO;
public:
TColor clBrushKuai,clPenKuai;
int GetKuaiCount;
bool GetKuaiColor;
int LetJiBie;
TColor GetBackColor;
int GetDaXiao;
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
const int intKuai[16][2][5] //方块样式数组,大小方块共16种
={
-2,-1, 0, 1,400,
0, 0, 0, 0,400,
-1, 0, 0,-1,400,
-1,-1, 0, 0,400,
0, 1, 0,-1,400,
-1,-1, 0, 0,400,
-1, 0, 0, 1,400,
-1,-1, 0, 0,400,
-1,-1, 0, 1,400,
-1, 0, 0, 0,400,
1, 1, 0,-1,400,
-1, 0, 0, 0,400,
0,-1, 0, 1,400,
-1, 0, 0, 0,400,
-1,-1, 0, 1, 1,
-1, 0, 0, 0,-1,
-1, 0, 0, 1, 1,
-1,-1, 0, 0, 1,
-1,-1, 0, 1, 2,
-1, 0, 0, 0, 0,
0,-1, 0, 1, 0,
-1, 0, 0, 0, 1,
0, 0, 0, 1, 2,
-2,-1, 0, 0, 0,
-1, 0, 0, 1, 2,
-1,-1, 0, 0, 0,
-1,-1, 0, 1, 1,
-1, 0, 0, 0, 1,
0,-1, 0, 1, 1,
-1, 0, 0, 0, 1,
0,-1, 0, 1, 2,
-1, 0, 0, 0, 0
};
const int KuaiColor[7]=
{0x4E3B1,0x4988F1,0x71CCB1,0xD58AD2, 0xEADD44,0x70C6EB,0xFDB7C1};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -