-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProject.cpp
46 lines (40 loc) · 905 Bytes
/
Project.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
45
46
#include "board.h"
#include "pieces.h"
#include "player.h"
using namespace std;
int main() {
srand(unsigned(time(NULL)));
while (true)
{
//Clearing the board for the next game
for (int i = 0; i < 8; i++)
for (int j = 0; j < 8; j++)
Board::board[i][j] = NULL;
//Clearing the screen of clutter
system("CLS");
int choice = 0;
cout << "\t\t CHESS" << endl;
cout << "\t\tWhat kind of game would you like to play?" << endl;
cout << "\t\t1. vs Bot" << endl << "\t\t2. vs Player" << endl << "\t\t3. Bot Vs Bot" << endl << "\t\t4. Quit" << endl;
cout << "\t\tYour choice: ";
while (choice < 1 || choice > 4)
cin >> choice;
switch (choice)
{
case 1:
vsPlayerGame(false, true);
break;
case 2:
vsPlayerGame(false, false);
break;
case 3:
vsPlayerGame(true, true);
break;
case 4:
break;
}
if (choice == 4)
break;
}
return 0;
}