-
Notifications
You must be signed in to change notification settings - Fork 16
/
main.cpp
44 lines (37 loc) · 823 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
41
42
43
44
#include <iostream>
#include "game.hpp"
int main(int argc, char const *argv[])
{
game newGame;
//GamePlay starts
try
{
short playConsent = 1;
do
{
if (!newGame.InitGame(playConsent))
{
std::cerr << "Couldn't initiate the game... Exiting" << std::endl;
return -1;
}
newGame.play();
std::cout << "Enter 1 if you want to play again and reset\n"
<< "Enter 2 if you want to play with same players\n"
<< "Anything else to say GoodBye :-)"
<< "\nYour Consent : ";
std::cin >> playConsent;
} while (playConsent == 1 || playConsent == 2);
std::cout << "Khelne ke liye Dhanyawaad :-D" << std::endl;
}
catch (endApplication &e)
{
std::cerr << e.what() << std::endl;
return 0;
}
catch (std::exception &e)
{
std::cerr << e.what();
return 0;
}
return 0;
}