-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
40 lines (38 loc) · 948 Bytes
/
main.cpp
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
#include "./src/4_in_a_row_app.cpp"
#include <iostream>
using namespace std;
int main() {
int x;
bool Exit = false;
bool first_time = true;
while (!Exit) {
if (first_time) {
cout << "Welcome to Connect 4 \n";
cout << "1- Play \n0- Exit \n";
cin >> x;
if (x == 1) {
first_time = four_in_row_game();
} else if (x == 0) {
cout << "Goodbye \n";
Exit = true;
} else {
cout << "Wrong input \n";
}
} else {
cout << "Welcome Back! \n";
cout << "I see you enjoyed that last one! \n";
cout << "Get ready for a new round! \n\n";
cout << "What do you want to do?: \n";
cout << "1- Play another round \n0- Exit \n";
cin >> x;
if (x == 1) {
first_time = four_in_row_game();
} else if (x == 0) {
cout << "Goodbye \n";
Exit = true;
} else {
cout << "Wrong input \n";
}
}
}
}