www.pudn.com > Tetris.rar > TBlock.h
#ifndef __TBLOCK_H #define __TBLOCK_H #includeconst 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