Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#ifndef ENEMY
#define ENEMY
class Enemy{
public:
int health;
int attack;
int defense;
int x;
int y;
char character;
std::string name;
Enemy(char enemy_char, int _health,int _attack, int _defense,std::string _name)
: character(enemy_char), health(_health), attack(_attack), defense(_defense), name(_name) {};
char get_char(){return character;}
int get_enemy_x(){return x;}
int get_enemy_y(){return y;}
void set_enemypos(int _x, int _y);
};
class Orc : public Enemy{
public:
Orc() : Enemy('o',20,4,10,"Orc"){}
};
class HighOrc : public Enemy
{
public:
HighOrc():Enemy('H',30,5,15,"High Orc"){}
};
class Undead : public Enemy{
public:
Undead() : Enemy('u',5,1,0,"Undead"){}
};
class UndeadKing : public Enemy
{
public:
UndeadKing():Enemy('K',15,2,5,"Undead King"){}
};
class Lizardman : public Enemy{
public:
Lizardman() : Enemy('l',45,10,15,"Lizardman"){}
};
class Dragon : public Enemy
{
public:
Dragon():Enemy('D',60,12,25,"Dragon"){}
};
#endif