square.h

来自「vc扫雷实例」· C头文件 代码 · 共 45 行

H
45
字号
// Square.h: interface for the Square class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SQUARE_H__4CFC7695_C306_4D15_A202_C2D7062C1E53__INCLUDED_)
#define AFX_SQUARE_H__4CFC7695_C306_4D15_A202_C2D7062C1E53__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Cell.h"
class Square  
{
public:
	Square(int row ,int col);
	CDC* pDC;
	virtual ~Square();
	void DrawPicture(CDC* pDC,int x,int y,int cx,int cy,BOOL bGrid,BOOL bUpdate,COLORREF bcolorCell);	
	void DrawData(CDC* pDC,Cell celldata,int row,int col,COLORREF colorCell);
	void DrawGrid(CDC* pDC,int row,int col,COLORREF GridCol,BOOL flag=TRUE);
	void EraseCell(CDC* pDC,int row,int col);
	BOOL CanDown(int row,int col,Cell* data);
	BOOL CanLeft(int row,int col,Cell* data);
	BOOL CanRight(int row,int col,Cell* data);
	BOOL CanTrun(int row,int col,Cell* data);
	void AddData(int row,int col,Cell* data);
	BOOL IsOver(int row,int col,Cell* data);
	BOOL IsFull(int row);
	void ClearRow(int row,int col);
	int LifeValue();
	BOOL RemoveGrid();
	int Grid[16][16];
	int  nScore;
	int nCols,nRows;
	int nCellWidth;
	int nCellHeight;
private:

	

	
};

#endif // !defined(AFX_SQUARE_H__4CFC7695_C306_4D15_A202_C2D7062C1E53__INCLUDED_)

⌨️ 快捷键说明

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