Skip to content

Instantly share code, notes, and snippets.

@carmel4a
Last active October 11, 2018 16:25
Show Gist options
  • Save carmel4a/34e26dbb7683f7472db892af9820ca22 to your computer and use it in GitHub Desktop.
Save carmel4a/34e26dbb7683f7472db892af9820ca22 to your computer and use it in GitHub Desktop.
class entity
{
int max_hp;
int hp;
int dmg;
int level;
};
class player : public entity
{
public:
string name;
int exp;
int gold;
int php( int level ); /// Player Health Points
};
player::php( int level )
{
int hp = 45;
hp +=(5*level);
return hp;
}
class monster : entity
{
int name;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment