43 lines
638 B
C++
43 lines
638 B
C++
#include <iostream>
|
|
#include <vector>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "GameEngine.h"
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
|
|
cout<<"Welcome to Breakthrough\n"<<endl;
|
|
cout<<"playing with AI..."<<endl;
|
|
|
|
Board b;
|
|
|
|
string move;
|
|
|
|
bool gameOver = false;
|
|
|
|
while (gameOver != true)
|
|
{
|
|
gameOver = b.isGameOver();
|
|
|
|
while(b.getTurn() == 'O')
|
|
{
|
|
b.displayBoard();
|
|
cout<<"\nEnter move: ";
|
|
cin>>move;
|
|
b.move(move);
|
|
}
|
|
|
|
|
|
vector<moves> possibleMoves = b.viewPossibleMoves();
|
|
//displayPossibleMoves(possibleMoves); for debugging purposes - AI
|
|
|
|
|
|
b.easyAI();
|
|
|
|
gameOver = b.isGameOver();
|
|
}
|
|
|
|
}
|