-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.hpp
More file actions
44 lines (34 loc) · 1.18 KB
/
Player.hpp
File metadata and controls
44 lines (34 loc) · 1.18 KB
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
/*******************************************************************************
* ** Author: Gavin Slusher
* ** Date: 6/2/2019
* ** Description: Player class specification file. Contains logic for the
* main player within the game. The class inherits from the
* MapObjects class, but adds in an additional MapObjects
* vector to hold more MapObjects as items, along with methods
* to manipulate the container.
* ** *************************************************************************/
#ifndef PLAYER_HPP
#define PLAYER_HPP
#include <string>
#include <vector>
#include "displayMenu.hpp"
#include "inputValidation.hpp"
#include "Items.hpp"
#include "MapObjects.hpp"
class Player: public MapObjects
{
protected:
const int MAX_INVENTORY = 7;
std::string name;
std::vector<MapObjects *> items;
public:
Player();
~Player();
void setName(std::string);
std::string getName();
virtual void addItem(MapObjects *&);
virtual void displayInv();
bool searchInv(std::string &);
int checkInvSize();
};
#endif