📄 game.h
字号:
// FILE: Game.h: interface for the CGame class.
// write by: fatehost
// date: 2004-1-16
// description: 这是一个黑白道游戏
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GAME_H__FA12D20C_E8E0_4B83_8D59_785DE567056E__INCLUDED_)
#define AFX_GAME_H__FA12D20C_E8E0_4B83_8D59_785DE567056E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define XSIZE 5
#define YSIZE 5
class CGame
{
private:
int m_uGameAry[XSIZE][YSIZE];//原始数组,保存开始状态
int m_uTempAry[XSIZE][YSIZE];//保存玩家每一步状态
public:
CGame();
virtual ~CGame();
/************************************************
*
*初始化数组
*
*************************************************/
void InitGameAry();
/************************************************
*
*玩家点击x,y处。根据黑白道游戏规则改变数组
*ary[x][y]=nValue
*************************************************/
bool SetTempGameAry(int x,int y,int nValue);
/************************************************
*
*获取数组值,错误返回-1
*
*************************************************/
int GetTempGameAry(int x,int y);
/************************************************
*
*获取最初数组值,错误返回-1
*
*************************************************/
int GetOrgAry(int x , int y);
/************************************************
*
*重来
*
*************************************************/
void RePlay();
};
#endif // !defined(AFX_GAME_H__FA12D20C_E8E0_4B83_8D59_785DE567056E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -