This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
breakthroughpine64backup/main.cpp

44 lines
638 B
C++
Raw Normal View History

2015-10-17 17:34:19 -05:00
#include <iostream>
#include <vector>
#include <stdlib.h>
2015-10-17 19:18:47 -05:00
#include <stdio.h>
2015-10-19 15:36:20 -05:00
#include "GameEngine.h"
2015-10-17 17:34:19 -05:00
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();
2015-10-17 19:18:47 -05:00
//displayPossibleMoves(possibleMoves); for debugging purposes - AI
2015-10-17 17:34:19 -05:00
2015-10-17 19:18:47 -05:00
b.easyAI();
2015-10-17 17:34:19 -05:00
gameOver = b.isGameOver();
}
}