-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
31 lines (27 loc) · 700 Bytes
/
Copy pathmain.cpp
File metadata and controls
31 lines (27 loc) · 700 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
// This file will contain the main function of the game;
#include"introFunc.h"
int main(){
initwindow(WIDTH,HEIGHT,(char*)"CHESS : Game Of Mind");
string exitStatus = "no";
welcome();
START_OF_GAME:
string whiteName,blackName;
clearBackground();
Sleep(100);
whiteName = takeUser((char*)"Enter name for white:");
blackName = takeUser((char*)"Enter name for black:");
mode = takeMode();
setUpArena();
Board board(whiteName,blackName);
board.setBoard();
board.setArena();
board.gameLoop();
Sleep(5000);
exitStatus = takeExit();
if(exitStatus=="no"){
goto START_OF_GAME;
}
getch();
closegraph();
return 0;
}