#ifndef _TILEBANK_H
#define _TILEBANK_H


#include <qwidget.h>

class Tile;

// holds max of each letter in bag
const int max_of_letter[26] = { 9, 2, 2, 4, 12, 2, 3, 2, 9, 1, 1, 4, 2, 6, 8, 2, 1, 6, 4, 6, 4, 2, 2, 1, 2, 1 };


class TileBank : public QWidget
{
	Q_OBJECT

	private:

		//	holds number of each letter where index is letter ID
		int NoOfLetters[26];
		
		
		// number of tiles in the bag
		int tiles_remaining;

	public:

		TileBank(QWidget* parent=0, const char* name=0);
		
		void addTile(Tile* NewTile);
			//addTile back to TileBank, not implemented

		bool isEmpty() const;
			//true if out of tiles
		int TilesLeft() const;
			//returns no of tiles

		void reset();
			//reset tilebank back to brand new

	public slots:

		void dealTile();
			//tells tilebank to deal a tile out through returnTile

	signals:

		void returnTile( int );
			//this is how tilebank passes out tiles to players
};



#endif