Entity.h 960 Bytes
Newer Older
Noah Olsen's avatar
Noah Olsen committed
1
// "Copyright [year] <Copyright Owner>"
Noah Olsen's avatar
commit  
Noah Olsen committed
2 3 4 5 6 7 8 9 10 11 12 13
#ifndef SRC_ENTITY_H_
#define SRC_ENTITY_H_

// no includes?
#include <string>

using std::cerr;
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
Noah Olsen's avatar
commit  
Noah Olsen committed
14 15 16 17

class MoveSet;

class Entity {
Noah Olsen's avatar
commit  
Noah Olsen committed
18
 public:
Noah Olsen's avatar
Noah Olsen committed
19 20 21 22
    bool checkHealth();
    void move();
    void setPos();
    virtual void action() const = 0;
Noah Olsen's avatar
commit  
Noah Olsen committed
23
    virtual void setClass() const = 0;
Noah Olsen's avatar
Noah Olsen committed
24

Noah Olsen's avatar
commit  
Noah Olsen committed
25
 protected:
Noah Olsen's avatar
Noah Olsen committed
26 27 28 29 30
    int colPos;
    int rowPos;
    int con;
    int str;
    int dex;
Noah Olsen's avatar
commit  
Noah Olsen committed
31 32 33
};

class Player : public Entity {
Noah Olsen's avatar
commit  
Noah Olsen committed
34
 public:
Noah Olsen's avatar
Noah Olsen committed
35 36 37 38
    Player();
    void action();
    void setClass(char Class);

Noah Olsen's avatar
commit  
Noah Olsen committed
39
 private:
Noah Olsen's avatar
Noah Olsen committed
40 41
    // Vector of inventory items
    // Vector of equipped items
Noah Olsen's avatar
commit  
Noah Olsen committed
42 43 44
};

class Enemy : public Entity {
Noah Olsen's avatar
commit  
Noah Olsen committed
45 46
 public:
    Enemy();
Noah Olsen's avatar
Noah Olsen committed
47
    void action();
Noah Olsen's avatar
commit  
Noah Olsen committed
48
    void setBossClass();
Noah Olsen's avatar
Noah Olsen committed
49 50 51 52
    void setClassByRand();
    void setClassByChoice(int monster);
    bool seesPlayer();

Noah Olsen's avatar
commit  
Noah Olsen committed
53
 private:
Noah Olsen's avatar
Noah Olsen committed
54 55
    // Vector of drop items
    // Vector of equipped items
Noah Olsen's avatar
commit  
Noah Olsen committed
56 57
};

Noah Olsen's avatar
commit  
Noah Olsen committed
58
#endif  // SRC_ENTITY_H_