-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItemManager.h
More file actions
38 lines (33 loc) · 864 Bytes
/
ItemManager.h
File metadata and controls
38 lines (33 loc) · 864 Bytes
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
#ifndef ITEMMANAGER_H
#define ITEMMANAGER_H
#define nullptr 0
#include <iostream>
#include <fstream>
#include <cassert>
#include "Item.h"
#include "Location.h"
using namespace std;
class ItemManager
{
public:
ItemManager ();
ItemManager (const string& game_name);
ItemManager (const ItemManager& to_copy);
~ItemManager ();
ItemManager& operator= (const ItemManager& to_copy);
int getScore () const;
void printAtLocation (const Location& location) const;
void printInventory () const;
bool isInInventory (char id) const;
void reset ();
void take (char id, const Location& player_location);
void leave (char id, const Location& player_location);
Item* my_item_array;
private:
void load(const string& filename);
unsigned int find (char id) const;
void sort();
bool invariant () const;
unsigned int item_count;
};
#endif