//==============================================================================
// 215 Lab 4 Starter Files
// Spring 2006
//
// Breadth-First Search
//
// packstate.h

#include <deque>
#include <iostream>

using namespace std;

enum ItemType {SMALL, MIDDLE, BIG};

#define BAG_SIZE 100  // capacity of the bag

class packstate
{
public:
	packstate();                        // constructor
	packstate( const packstate& );             // copy constructor
	~packstate();                       // destructor

	deque<packstate> GetSuccessors();   // returns a queue of successor states

	int GetPacked( ItemType );          // returns how many of that type is packed
 	int GetLeft( ItemType );            // returns how many of that type is left

	bool IsFull();                      // returns true if this is a full bag

	const packstate& operator= ( const packstate& );   // assignment operator

private:
	int space;        // how much space is left in the bag
	int packed[3];    // count of how many of each type have been packed
	int left[3];      // count of how many are left unpacked
	                  // both: indexed by ItemType

	void Pack( ItemType );   // pack one more item of that type

}; // end class