#ifndef _USEDWORDLIST
#define _USEDWORDLIST

#include "Word.h"
#include "MaxLengthConstants.h"

	class PreviouslyUsedWordList{

	private:

		int numOfElementsInList;			// Number of elements currently in list

		Word UsedWords[MaxListLength];	// stores list of words.

		void addWord(const Word &theWord);
		//		
		// post-condition: theWord added to UsedWords array.
		//				   numOfElementsInList is incremented.
		//

	public:

		PreviouslyUsedWordList();
		//		
		// post-condition: numOfElementsInList is initialised to 0.
		//

		int hasWordBeenUsed(const Word &theWord);
		//		
		// post-condition: Returns a value of 1 (TRUE) if word has been used.
		//                 Returns a value of 0 (FALSE) if word has not been used
		//                 before..
		//    

		void resetList() {numOfElementsInList = 0;}
		//		
		// post-condition: Resets number of elemenets in list to equal 0.
		//

		int getNumOfElementsInList() {return (numOfElementsInList-1);}
		//		
		// post-condition: Returns the number of words currently in the list.
		//				   numOfElementsInList is equal to the next available space in the list
		//				   so the last list element is (numOfElementsInList-1).
		//

	};


#endif