#ifndef POUCH_H
#define POUCH_H
-class Pouch {
- public:
-
- Pouch(int h = 0, int s = 0, int d = 0); // Default constructor
-
- // Access functions to get the number of each potion in inventory
- int Healing() { return healing; };
- int Strength() { return strength; };
- int Defense() { return defense; };
-
- // Modifiers to set the number of potions
- int setHealing (int h = 0) { healing = h; return Healing();};
- int setStrength (int s = 0) { strength = s; return Strength(); };
- int setDefense (int d = 0) { defense = d; return Defense();};
-
- // Add one healing potion
- int incHealing() { return setHealing(Healing() + 1); };
-
- // Add one Strength potion
- int incStrength() { return setStrength(Strength() + 1); };
-
- // Add one Defense potion
- int incDefense() { return setDefense(Defense() + 1); };
-
- // Reset all potions to 0
- void reset() { setHealing(0); setStrength(0); setDefense(0); };
-
- private:
- // Potions
- int healing;
- int strength;
- int defense;
+#include <list>
+#include <string>
+
+class item; // forward declaration
+class itemContainer; // forward declaration
+
+using namespace std;
+
+class pouch
+{
+ public:
+ pouch();
+ pouch(pouch *);
+ pouch(const pouch &);
+ ~pouch();
+
+ void sort();
+ void clear();
+ bool isEmpty();
+ int getCount() {return count; };
+
+ itemContainer *Find(char *);
+ itemContainer *Find(string &);
+ itemContainer *Find(int );
+
+ itemContainer *addItem(item *);
+ itemContainer *addItem(item *, int);
+ itemContainer *addItemNoChecks(item *);
+ void deleteItem(item *);
+ list <itemContainer> *getItems() { return &items; };
+
+ // operators
+ const pouch &operator = ( const pouch &);
+
+ private:
+ list <itemContainer> items;
+ long count;
};
#endif