unit1.h

来自「在bcb6开发环境下自己写的贪食蛇游戏,代码比较少,界面简洁,但是功能比较全!」· C头文件 代码 · 共 44 行

H
44
字号
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TScrollBox *ScrollBox1;
        TTimer *Timer1;
        TPaintBox *PaintBox1;
        TLabel *Label1;
        TLabel *Label2;
        TLabel *Label3;
        void __fastcall FormShow(TObject *Sender);
        void __fastcall PaintBox1Paint(TObject *Sender);
        void __fastcall Timer1Timer(TObject *Sender);
        void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
private:	// User declarations
    Graphics::TBitmap *TtBmp;
    Graphics::TBitmap *HeadBmp;
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        void __fastcall TForm1::Move(int Orientation);
        void __fastcall TForm1::SaveToBuffer();
        void __fastcall TForm1::Display_Snake();
        int __fastcall TForm1::Check_Snake(int x,int y,int Orientation);
        void __fastcall ChangeToData(int x,int y);
        void __fastcall CycData();
        void __fastcall RandomTarget();
        void __fastcall SnakeInitialize();
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?