-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.h
More file actions
25 lines (15 loc) · 694 Bytes
/
game.h
File metadata and controls
25 lines (15 loc) · 694 Bytes
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
#ifndef GAME_H_
#define GAME_H_
#include <unordered_set>
typedef std::unordered_set<std::string> Dictionary;
std::unique_ptr<Dictionary> ReadDictionary();
struct GameState {
std::string word;
std::vector<std::string> guesses;
};
// Creates a game for a user
void InitGame(std::unordered_map<dpp::snowflake, GameState> &games,const dpp::snowflake &user,const std::unique_ptr<Dictionary> &dictionary);
std::string Guess(dpp::snowflake user, std::string guess, std::unordered_map<dpp::snowflake, GameState> &games,const std::unique_ptr<Dictionary> &dictionary);
void visualDepiction(GameState &game);
void winnerGame(dpp::snowflake user, GameState &games, std::string guess);
#endif