All pastes #707672 Raw Edit

monster

public text v1 · immutable
#707672 ·published 2007-09-23 04:52 UTC
rendered paste body
#ifndef MONSTER_H
#define MONSTER_H

#include "weapon.h"
#include <string>

class player;

class monster
{
      public:
             monster(const std::string& name, int hp, int acc,
             int xp, int armor, const std::string& weaponname,
             int lowdamage, int highdamage);
             
             bool isdead();
             
             int getxp();
             std::string getname;
             int getarmor;
             
             void attack(player& player);
             void takedamage(int damage);
             void displayhitpoints();
             
             private:
                     std::string name;
                     int hitpoints;
                     int accuracy;
                     int xp;
                     int armor;
                     weapon weapon;
};

#endif