diff --git a/Board.cpp b/Board.cpp index 479dfd1..f800776 100755 --- a/Board.cpp +++ b/Board.cpp @@ -87,8 +87,7 @@ void Board::changeTurns() } void Board::displayBoard() -{ - cout<<"\n\n"; +{ cout<<"; A B C D E F G H"< input) -{ - cout<<"\n\nList of possible Moves:"< record; @@ -545,17 +535,19 @@ void Board::easyAI() vector listOfMoves = viewPossibleMoves(); - //2) pick a movement - - srand(time(NULL)); - int randomChoice = rand() % (listOfMoves.size()-1) - 0; // choose a move betwen listOfMoves[0] to last element - - //3) execute movement - - int temp = randomChoice; - - move(listOfMoves[randomChoice]); - - //cout<<"\n\nMove executed by AI: "< viewPossibleMoves(); string myToUpper(string input); - void displayPossibleMoves(vector input); void undo(Board& tablero); void interpret(string input, Board& tablero); void snapshot(vector& inputVec, Board inputBoard); diff --git a/a.out b/a.out index 20d22fc..3bc9dbb 100755 Binary files a/a.out and b/a.out differ diff --git a/test.cpp b/test.cpp index 368e689..ab1f968 100755 --- a/test.cpp +++ b/test.cpp @@ -40,7 +40,6 @@ int main() vector possibleMoves = b.viewPossibleMoves(); - //displayPossibleMoves(possibleMoves); for debugging purposes - AI if (choice == 1) { @@ -53,6 +52,7 @@ int main() { b.displayBoard(); cout<<"\nEnter command: "; + cout<<"OK\n"; cin>>move; b.interpret(move,b); }