block.h

来自「《基于symbian手机开发与应用》一书的源代码」· C头文件 代码 · 共 24 行

H
24
字号
#ifndef BLOCK_H
#define BLOCK_H

#include <e32std.h>

class TBlock
{
public:
  TBlock() :iType(0), iRot(0) {}
  static int BlockCount();
  static TBlock Block(int id);
  static TBlock RandomBlock(TInt64 &seed);

  void Rotate(int dir);
  TInt8 RowMask(int nr) const;
  TInt8 Color() const;
protected:
  TBlock(int aType, int aRot) :iType(aType), iRot(aRot) { }
private:
  TInt8 iType;
  TInt8 iRot;
};

#endif

⌨️ 快捷键说明

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