Remeber to use a class for the player and enemy. Use a constructor to implement and action the variables, General idea I used for my Flymo game:
Code:
class Player
{
public:
Player( Hp = 100, Mp = 0, Expi = 1, Score = 0 );
private:
int m_hp;
int m_mp;
int m_expi;
string m_name;
long m_score;
};
Player::Player (Hp, Mp, Expi, Score);
{
hp = Hp;
mp = Mp;
expi = Expi;
score = Score;
}
Just an idea, you do not have to use this example, but I found it effective in the game
I made. There may be some errors in the code above but you get the general idea