add forward declaration examples
add class & inheritance examples
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include "Monster.h"
|
||||
|
||||
Monster::Monster(int strength) : Entity("My Monster"), _strength(strength)
|
||||
{
|
||||
this->name = "My Monster";
|
||||
}
|
||||
|
||||
std::string Monster::ToString()
|
||||
{
|
||||
return name + " " + "(" + std::to_string(_strength) + ")";
|
||||
// TODO: show format
|
||||
}
|
||||
|
||||
int Monster::Compare(ICompareable* other)
|
||||
{
|
||||
// TODO: implement later
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user