-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathothello.cpp
38 lines (31 loc) · 828 Bytes
/
othello.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
/*************************
* Othello
*
* An Othello AI that implements a minimax A* search
* using alpha/beta pruning
*
* Sharang Phadke
* 10/26/2013
************************/
#include <iostream>
#include "game.h"
using namespace std;
int main(int argc, char *argv[]){
char gameType;
Game game;
cout << "Welcome to Sharang's Othello AI" << endl
<< "Choose a game type:" << endl
<< "1: go first (black)" << endl
<< "2. go second (white)" << endl
<< "3: computer vs. computer" << endl;
while(true){
cin >> gameType;
if((gameType == '1') || (gameType == '2') || (gameType == '3')){
game.Setup(gameType-'0');
break;
}
cout << "Invalid option!" << endl << "Try again: ";
}
game.Play();
return 0;
}