-
Notifications
You must be signed in to change notification settings - Fork 0
/
word.h
30 lines (26 loc) · 836 Bytes
/
word.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef WORD_H
#define WORD_H
#include <string>
using namespace std;
class Word {
public:
Word() {row = col = -1; direction = NOT_ON_PUZZLE;};
~Word() {};
Word(string s); // Create a new Word with the plain text s
string GetWord() {return word;};
string GenAnagram(); // Generate a new anagram for the Word. Return the anagram. Used to generate clues in the puzzle.
string GetAnagram() {// Return the current anagram. Generates an anagram if one does not exist.
return anagram;
};
void SetWord(string s) { // Set the plain text for this word.
word = s;
};
static const int NOT_ON_PUZZLE = 0;
static const int HORIZONTAL = 1;
static const int VERTICAL = 2;
int row, col, direction;
private:
string word; // The plaintext word
string anagram; // An anagram of the word.
};
#endif