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

📄 tgrid.h

📁 俄罗斯方块
💻 H
字号:
#ifndef TGRID_H_
#define TGRID_H_

#include <e32std.h>

#include "TBlock.h"

const int KGridX=10;
const int KGridY=20;


// A Grid is used to put a Block's type to its Content and detect if there's a Collide.
class TGrid
{
// Constuct
public:
	TGrid();
	static TGrid NewGrid();

///////////////////////////////////////////////////////////////////////
// Other Method
public:
	bool DoesCollide(const TBlock& aBlock, const TPoint& aPoint) const;

	void PutBlock(const TBlock& aBlock, const TPoint& aPoint);

	void Clear();


//////////////////////////////////////////////////////////////////////////
// Data
public:
	TFixedArray<TUint16, KGridY> iMask;

	TFixedArray<TFixedArray<TInt8, KGridX>, KGridY> iContent;
};



#endif /*TGRID_H_*/

⌨️ 快捷键说明

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