📄 game.h
字号:
// GAME.h: interface for the GAME class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GAME_H__ADE5F48D_3B62_4228_A086_27E84AF8F0D9__INCLUDED_)
#define AFX_GAME_H__ADE5F48D_3B62_4228_A086_27E84AF8F0D9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
struct BOX
{
int x; //当前X坐标
int y; //当前Y坐标
POINT Pxy; //对应图片坐标
BOOL Bomb; //是否有雷
BOOL Action; //是否发现雷
BOOL AutoAction;
BOOL Tag; //是否加探雷标签
};
class GAME
{
public:
GAME();
virtual ~GAME();
CStatic TitleBomb,GameTime,GameEnd;
CButton TitleButton;
BOOL BackWave;
int TimeCount; //定义时间计时器
RECT WindowRange; //改变窗口大小
BOX box[24][24]; //定义探测区大小
BOOL GameStart; //游戏是否开始
int Count; //自定义计随机数
int BombNum; //定义雷的总数目
int LeftBombNum; //实际剩余雷的数目
int PlayLeftBombNum; //玩者剩余雷的数目
int ActionBombNum; //玩者剩余的探测器数目
int ActionNum; //定义行动次数
int Width; //定义探测宽度
int Heigh; //定义探测高度
void InitGame(); //初始化游戏开始
void InitEndGame(); //初始化游戏结束
int GetDombNum(POINT Mouse); //得到周围雷的数目
int GetDombNum(int i,int j);
void AutoDrawBox(CDC *pDC,int i,int j); //自动绘制
void ActionDrawBox(CDC *pDC,int i,int j); //自绘
void DrawBox(CDC *pDC,POINT Mouse,POINT Pxy); //在该位置画Box状态
void DrawAllBox(CDC *pDC); //游戏结束绘制所有
};
#endif // !defined(AFX_GAME_H__ADE5F48D_3B62_4228_A086_27E84AF8F0D9__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -