-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGame.h
38 lines (30 loc) · 1 KB
/
Game.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
#ifndef GAME_H
#define GAME_H
#include <iostream>
#include <string>
#include "Grid.h"
#include "GameMode.h"
#include <fstream>
using namespace std;
class Game
{
private:
//instance variables
GameMode *mode; //gamemode class for updating grid each generation
Grid *grid; //grid class to contain grid
int returnMode; //whether game is returned with usleep, by pressing enter, or to a file
string outputFileName; //path to output file
public:
//Constructors
Game();
//Destructor
~Game();
//Mutator Functions
void promptGameMode();//asks the user what gamemode they want and creates mode object
void promptCells();//asks the user how they'd like to populate the grid
void promptOutput();//asks the user how the game should be returned
string promptFileName();//prompts for a file name and returns it as a string
string outFileName();//prompts for a file name to output data to
void gameLoop();//runs game
};
#endif