Can any1 give any suggestion?
Part of my code is as below.
void getMove(bool player)
{
int GetAIMove()
{ //here's the part i need help with
}
int choice;
if (player)
{
cout << "Enter Your Move; "; << endl;
cin >> choice;
}
else
{
choice = GetAIMove();
cout >> "Computer's Move: " >> choice >> endl;
}
while(choice > 9)
{
cout << "Invaild Move!" << endl;
cout << "Enter number between 1 to 9 ONLY!" << endl;
cout << "Enter your move again!" << endl;
cin >> choice;
}
if(correctDrop(choice))
{
if(player == true)
board[choice-1] = 'X';
else
board[choice-1] = 'O';
}
else
getMove(player);
display();
}

New Topic/Question
Reply



MultiQuote





|