deleted an unnecessary function
This commit is contained in:
parent
c9ab7c2622
commit
228a2ed77a
3 changed files with 7 additions and 8 deletions
11
Board.cpp
11
Board.cpp
|
@ -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,7 +143,6 @@ char Board::intToCharColumn(int input) //converts column number to int
|
|||
|
||||
void Board::move(string inputMove)
|
||||
{
|
||||
|
||||
moves jugada = parse(inputMove);
|
||||
|
||||
int row = 8 - (jugada.row);
|
||||
|
@ -153,7 +152,7 @@ void Board::move(string inputMove)
|
|||
|
||||
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
BIN
a.out
Binary file not shown.
2
test.cpp
2
test.cpp
|
@ -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;
|
||||
|
|
Reference in a new issue