57 std::string mBonusType;
64 bool Valid()
const {
return mType>=0; }
67 bool Visible()
const {
return mState>=0; }
76 int State()
const {
return mState; }
79 const std::string&
Bonus()
const {
return mBonusType; }
86 void Set(
int typ,
int state=0,
int score=1,
const std::string& bonus =
"");
89 int Type()
const {
return mType; }
int Hit()
Hit the block, return the related score.
int Type() const
Get the type of this block (identifier of the block type)
Definition: Block.h:89
void Hide()
Hide (destroy only visually) the block.
Definition: Block.h:70
bool Valid() const
Check if the block was well defined.
Definition: Block.h:64
int State() const
Get the current block state (decreased when hit, 0=destroyed)
Definition: Block.h:76
A box-shaped object.
Definition: BoxObj.h:51
Block()
Constructor: initialize data members.
bool Visible() const
Check if the block is still visible.
Definition: Block.h:67
Wall block.
Definition: Block.h:52
const std::string & Bonus() const
Get the score bonus related to this block.
Definition: Block.h:79
void Set(int typ, int state=0, int score=1, const std::string &bonus="")