#include <iostream.h>
#include "WordList.h"

WordList::WordList():
		numOfElementsInList(0)
{
}

void WordList::addWord(const Word &theWord)
{
	// adds word to list

	if (numOfElementsInList >= MaxListLength)
	{
		resetList();
	}

	theWords[numOfElementsInList] = theWord;
	numOfElementsInList++;

}

Word WordList::getWord(int listArrayElement)
{
	// Returns a word in the list at array element[listArrayElement]

	return theWords[listArrayElement];
}


