-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgameFlow.h
More file actions
47 lines (34 loc) · 1.14 KB
/
Copy pathgameFlow.h
File metadata and controls
47 lines (34 loc) · 1.14 KB
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
//
// gameFlow.h
// AdvProgEX1
//
// Created by Alexander Shugaley on 17/11/2017.
// Copyright © 2017 Alexander Shugaley. All rights reserved.
//
#ifndef gameFlow_h
#define gameFlow_h
#include "JigsawParser.h"
#include "JigsawSolutionExistsChecks.h"
#include "JigsawSolutionExistsRotationsAllowed.h"
#include "JigsawPuzzle.h"
#include "JigsawPuzzleRotations.h"
#define WRONG_ARGS "Error: you need to supply input file representing a puzzle game and an output file. '-rotate' flag is optional"
/**
* Class for holding the flow function, is the container of the game, runs the parsing and then the algo
*/
using namespace std;
class gameFlow {
private:
char* infile;
char* outfile;
bool validCommandParsing = false; //check if format is ok
bool rotate = false; //isRotations = true?
public:
gameFlow(int argc, char* argv[]);
//the main function of the flow
bool runMainFlow();
bool parseCommandLineArgs(int argc, char* argv[]); //parse the command line args
bool rotateCommandExists(int argc, char* argv[]); //check if "-rotate" applies
bool getValidCommandParsing(); //getter
};
#endif /* gameFlow_h */