-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player.h
65 lines (56 loc) · 1.46 KB
/
Player.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef PLAYER_H
#define PLAYER_H
#include "Character.h"
#include "Item.h"
#include "Cell_Pair.h"
#ifndef __cplusplus
typedef void Player;
#endif
#ifdef __cplusplus
class Player : public Character{
private:
Player();
Player(Player const&);
Player& operator=(Player const&);
static Player* player;
int** sight;
Item* carry[10];
Item* equip[12];
Item* potions[5];
int weight;
int max_weight;
int pesos;
public:
static Player* getPlayer();
Pair getPos() const;
int getWeight() const;
int getMaxWeight() const;
int getPesos() const;
Item ** inventory();
Item ** equipment();
Item ** purse();
int** setSight(int height, int width);
Item* buy(int index, Item* item);
bool pick(Item* item);
int drop(int itm_idx);
void expunge(int itm_idx);
void wear(int itm_idx);
bool take_off(int index);
virtual int attack() const;
void earn(int amount);
virtual bool takeDamage(int damage);
// void updateSight(int height, int width, char map[][width]);
void freeSight(int height);
void clearSlots(bool inventory, bool equipment);
void unequip_all();
static void deletePlayer();
};
extern "C" {
#endif /*EXTERN OPEN*/
int** csetSight(Character* p, int height, int width);
// void cupdateSight(Character* p, int height, int width, char map[][width]);
void cfreeSight(Character* p, int height);
#ifdef __cplusplus
}
#endif /*EXTERN CLOSE*/
#endif /*PLAYER_H*/