-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItem.h
36 lines (30 loc) · 803 Bytes
/
Item.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef ITEM_H_INCLUDED
#define ITEM_H_INCLUDED
#include <iostream>
#include <string>
#include <vector>
#include "Object.h"
#include "Player.h"
using namespace std;
class Player;
class Item: public Object
{
private:
int health,attack,defense;
public:
Item();
Item(string, int, int, int);
/* Virtual function that you need to complete */
/* In Item, this function should deal with the */
/* pick up action. You should add status to the */
/* player. */
void triggerEvent(Object*,Object*);
/* Set & Get function*/
int getHealth();
int getAttack();
int getDefense();
void setHealth(int);
void setAttack(int);
void setDefense(int);
};
#endif // ITEM_H_INCLUDED