Last active
October 11, 2018 16:25
-
-
Save carmel4a/34e26dbb7683f7472db892af9820ca22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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