⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c15_1f.h

📁 C++Builder编程实例详解,用具体的例子阐明C++的一些基本操作,所有程序均在BC++上编译过.可靠,建议下载
💻 H
字号:
//---------------------------------------------------------------------------
#ifndef C15_1fH
#define C15_1fH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\Menus.hpp>
#include <vcl\ComCtrls.hpp>
#include <vcl\ExtCtrls.hpp>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// 自定义
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>

#define RedPlayer 1
#define BluePlayer 2
#define OtherPlayer -1
#define NoPlayer 0
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
	TMainMenu *MainMenu1;
	TMenuItem *Game;
	TMenuItem *NewGame;
	TMenuItem *N3;
	TMenuItem *Exit;
	TStatusBar *StatusBar1;
	TPaintBox *PaintBox1;
	TTimer *Timer1;
	void __fastcall NewGameClick(TObject *Sender);
	void __fastcall PaintBox1Paint(TObject *Sender);
	void __fastcall FormResize(TObject *Sender);
	void __fastcall PaintBox1MouseUp(TObject *Sender, TMouseButton Button,
	TShiftState Shift, int X, int Y);
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall Timer1Timer(TObject *Sender);
	void __fastcall ExitClick(TObject *Sender);
private:	// User declarations
public:		// User declarations
	void NewGameDraw();
        void GameDraw();
        void DrawRed(int, int);
        void DrawBlue(int, int);
        bool NoWon();
        bool IsWon(int);
        bool WonAt(int, int, int);
        void BlueMove(); // 计算机走棋函数,计算最优位置。
        bool IsBlue(int, int);
        bool IsRed(int, int);
        bool IsNot(int, int);
        void PaintDraw();
        int OneStepX;
        int OneStepY;
        short Block[5][5];
        bool Gaming;
        bool Drawable;
	__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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