-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHangman.h
36 lines (32 loc) · 1.07 KB
/
Hangman.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
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include "dictionary.h"
using namespace std;
#ifndef HangmanManager_H
#define HangmanManager_H
//size of the dictionary = 127142
class Hangman: public dictionary
{
public:
Hangman();//default
Hangman(int,int,string);// length of word, number of guesses
string pattern(int); //---a--
bool readFile(); //returns a string of guesses made by the user
int record(string); //records the guess in a
int guessesLeft(); //returns the number of guessesLeft numGuess--
string getAnswer();//return a string of
string getGuesses();//return a string output of the guesses made [a,b,c,d,e,...]
private:
int numGuesses;//number of user guesses
int wordlength;//inputed by the user
int long dictionSize;//dictionary size
string fileName;
string wordAnswer;//random word chosen
string strGuesses; //guesses output string
string outPattern; //-a- cat pattern
vector<string> dictionary; //words
vector<string> guesses; //guesses made by the user
};
#endif