Q:

Proper object usage in a simple game setting

Assuming that I wanted to make a simple dos-based game and I wanted to create some mobs, I've come up with the following rough object that I would need, and it looks something like this:
class createMob{ 
    private:
        int healthMax;
        int healthCurrent;
        int manaMax;
        int manaCurrent;
        int experiencePoints;

public:
    void setHealth();
    int getHealth();
    void setCurrentHealth();
    int getCurrentHealth();

    void setMaxMana();
    int getMaxMana();
    void setCurrentMana();
    int getCurrentMana();

    int getExperience();
//etc etc functions truncated for space

};

My question is how do I use this?  Assume that I create a simple constructor to take in a hp / mp / experience for a mob called "green slime" (final fantasy theme going on here).  My basic goal is to create a monster with x / y /z attributes and set them based on what happens in combat... What would be the easiest way to do this and then clean up efficiently afterwards?

A:

If you have two mobs in a fight, the fight is going to take longer than one turn, so one fight turn is going to need the following global function:
void fight(Mob &m1, Mob &m2, int fightstep);

Now this function can change properties of both mobs. Now if mobs are actually doing some actions to choose how the fight is going, you'll need something different:
void fight(Mob &m1, Mob &m2, 
           std::vector<Action> vec1, std::vector<Action> vec2, 
           int fightstep);

with the action being something like this:
enum Action { EDoNothing, EBash, ECastSpellXXXX ... };

Now the fight functions can use the interface of Mob class to do the changes.

