#include #include using namespace std; #ifndef WORDMATRIX_H #define WORDMATRIX_H class WordMatrix { public: WordMatrix(); // default constructor - will always create the same matrix // (usefull for testing) WordMatrix(int size, string toHide[], int numToHide); // constructor - hides a given set of words // not currently implemented // // inspectors int GetNumWords(); // return number of words in the word matrix string GetNthRow(int rowNum); // return string that is in the given row string GetNthCol(int colNum); string GetDiagRight(int startRow, int startCol); // return string that starts in the given row,col and goes down and to the right string GetDiagLeft(int startRow, int startCol); // return string that starts in the given row,col and goes down and to the left string GetNthSearchWord(int wordNum); // return word in search list - given position int GetSize(); // return size of the Word Matrix private: // assume matrix will not be larger than 20 x 20 // and search list will not contain more than 100 words string matrix[20]; // the matrix of letters - represnted as an array of string string toSearchFor[100]; // the list of words to search for in the matrix int numWords; int size; // how wide and tall the matrix is }; // allows outputting all info about word matrix ostream& operator << (ostream & strOut, WordMatrix & myMatrix); #endif