TBlock.h
上传用户:snevogroup
上传日期:2008-06-06
资源大小:432k
文件大小:1k
- #ifndef __TBLOCK_H
- #define __TBLOCK_H
- #include <e32std.h>
- const TUint8 BLOCKNUM = 15;
- class TBlock
- {
- // construct
- public:
- TBlock() : iType(0), iRot(0)
- {}
-
- TBlock(TUint8 aType, TInt8 aRot) : iType(aType), iRot(aRot)
- {}
- ///////////////////////////////////////////////////////////////
- // Other Method
- public:
- static TBlock Block(TUint8 aType);
- static TBlock RandomBlock(TInt64 &seed, const TUint8 aClassify);
- void Rotate(TInt8 dir);
- TUint16 RowMask(TInt nr) const;
- TUint8 Type() const;
- //////////////////////////////////////////////////////////////////
- // Data
- private:
- TUint8 iType;
- TInt8 iRot;
- };
- #endif