-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMapObjects.hpp
More file actions
58 lines (48 loc) · 1.62 KB
/
MapObjects.hpp
File metadata and controls
58 lines (48 loc) · 1.62 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*******************************************************************************
* ** Author: Gavin Slusher
* ** Date: 6/2/2019
* ** Description: MapObject class specification file. Contains logic to define
* the objects that will be put in the "map" (2D array) of any
* space class or subclass. Has methods and a constuctor
* to define an object icon, description, and whether or not
* the object is solid, an item, or interactable.
* ** *************************************************************************/
#ifndef MAPOBJECTS_HPP
#define MAPOBJECTS_HPP
#include <string>
#include "displayMenu.hpp"
#include "inputValidation.hpp"
const char GRASS= ',';
class MapObjects
{
protected:
//graphics
char icon;
std::string description;
bool interactable;
bool solid;
bool item;
std::string name;
public:
MapObjects();
MapObjects(char, bool, bool, bool, std::string);
//Methods
virtual void interact();
virtual void addItem(MapObjects *&);
virtual void displayInv();
//Get Methods
virtual char getIcon();
bool getInteractable();
bool getSolid();
bool getItem();
std::string getDescription();
std::string getName();
//Set Methods
virtual void setIcon(char);
void setInteractable(bool boolIn);
void setSolid(bool boolIn);
void setItem(bool boolIn);
void setDescription(std::string &);
void setName(string nameIn);
};
#endif