-
Notifications
You must be signed in to change notification settings - Fork 0
/
Boggle.h
49 lines (38 loc) · 868 Bytes
/
Boggle.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Boggle.h
*
* Created on: Nov 11, 2015
* Author: Gessi
*/
#ifndef BOGGLE_H_
#define BOGGLE_H_
#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include "Dictionary.h"
using namespace std;
class Boggle{
public:
static const int minLength = 3;
static const int MAX_ROWS = 4;
static const int MAX_COLS = 4;
// constructor
Boggle();
// functions for Boggle()
void print();
void humanPlay();
void computerPlay();
bool isLegit(string word, vector<string> wordList);
bool alreadyUsed(string word, vector<string> wordList);
void findWord(char theBoard[MAX_ROWS][MAX_COLS],
int startR, int startC, string word);
private:
int numRows;
int numCols;
Dictionary dictionary;
vector<string> wordsOnBoard;
vector<string> ansList;
char theBoard[MAX_ROWS][MAX_COLS];
};
#endif /* BOGGLE_H_ */