#ifndef _WORDGAME_H #define _WORDGAME_H #include using namespace std; #include "point.h" #include "tvector.h" #include "linkset.h" class WordGame { public: WordGame(int size); // max grid size void MakeBoard(); // create a grid of letters // is a word on the board? one version returns locations bool OnBoard(const string& s); bool OnBoard(const string& s, tvector& locations); // other functions private: typedef LinkSet PointSet; typedef LinkSetIterator PointSetIterator; tmatrix myBoard; tvector myLetterLocs; PointSet myVisited; bool IsAdjacent(const Point& p, const Point& q); bool OnBoardAt(const string& s, const Point& p, tvector& locs); };