-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
48 lines (37 loc) · 722 Bytes
/
Copy pathmain.cpp
File metadata and controls
48 lines (37 loc) · 722 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#include <time.h>
#include "map.h"
#include "AI.h"
#include "Output.h"
#include "GameSingleton.h"
using namespace std;
void main()
{
srand(static_cast<int>(time(0)));
string option;
bool quit = false;
string answer;
Output output;
while (!quit)
{
output.StartMenu();
cout << "What would you like to do?:" << endl;
cout << "1. Start Game with Default Map" << endl;
cout << "2. Create Map" << endl;
cout << "Choice: ";
cin >> answer;
if (answer[0] == '1')
{
GameSingleton *game;
game = GameSingleton::getInstance();
game->startGame();
}
else
{
map newMap;
newMap.createMap();
}
cout << "Would you like to quit? (Y/N): ";
cin >> answer;
}
}