tgrid.h
来自「在symbian2.0平台上开发的完整的俄罗斯方块的源码。」· C头文件 代码 · 共 40 行
H
40 行
#ifndef __GRID_H
#define __GRID_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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?