deleted an unnecessary function

This commit is contained in:
Rebecca Schofield 2015-10-20 19:17:47 -05:00
parent c9ab7c2622
commit 228a2ed77a
3 changed files with 7 additions and 8 deletions

View file

@ -100,7 +100,7 @@ void Board::displayBoard()
cout<<"|\n";
}
cout<<'\n'<<endl;
cout<<"turn : "<<turn;
cout<<"turn : "<<turn << "\n";
}
int Board::charToIntColumn(char input) //converts column number to int
@ -143,17 +143,16 @@ char Board::intToCharColumn(int input) //converts column number to int
void Board::move(string inputMove)
{
moves jugada = parse(inputMove);
int row = 8 - (jugada.row);
int kolumn = charToIntColumn(jugada.column);
int temp = boardArray[row][kolumn];
int reflector = 1;
if (row > 8 || row < 0 || kolumn > 8 || kolumn < 0)
{
cout<<"ERROR: index out of bound!"<<endl;
cout<<"ERROR: index out of bound in move()!"<<endl;
}
else if (temp != turn)
@ -262,7 +261,7 @@ void Board::move(moves jugada)
if (row > 8 || row < 0 || kolumn > 8 || kolumn < 0)
{
cout<<"ERROR: index out of bound!"<<endl;
cout<<"ERROR: index out of bound in second move()!"<<endl;
}
int temp = boardArray[row][kolumn];
@ -536,8 +535,8 @@ void Board::easyAI()
vector<moves> listOfMoves = viewPossibleMoves();
//obvious moves
if (){
//
if (false){
return;
}
//random

BIN
a.out

Binary file not shown.

View file

@ -12,7 +12,7 @@ int main()
cout<<"1. Play against AI?\n";
cout<<"2. Play against a human?\n";
cout<<"CHANGE THIS TO PARSE THINGS\n";
//cout<<"CHANGE THIS TO PARSE THINGS\n";
cout<<"Enter choice: \n";
int choice;