-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArea.h
56 lines (51 loc) · 1.06 KB
/
Area.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
#ifndef AREA_H
#define AREA_H
#include <string>
#include <iostream>
#include "Item.h"
#include "ull.h"
using namespace std;
class Area{
public:
void setDescription (string desc){
description = desc;
}
void setGoal(bool g){
goal = g;
}
void setID(bool id){
instadeath = id;
}
string getDescription(){
return description;
}
bool getID(){
return instadeath;
}
bool getGoal(){
return goal;
}
void displayArea(){
cout<<description<<endl;
}
void search(){
nodeType<Item*>* current = items.getFirst();
// nodeType<Item*>* next = current;
// nodeType<Item*>* temp;
if(current == NULL){
cout <<"There are no items in this area\n";
return;
}
cout<<"The following items are in this area:\n";
while(current != nullptr){
cout<<"\t"<<current->info->getName()<<endl;
current = current->link;
}
}
uLList<Item*> items;
private:
string description;
bool instadeath;
bool goal;
};
#endif