Jump to content
Science Forums

Recommended Posts

Posted

Thanx a lot Pyro, I hav understood the two functions findwinner() & immediatewin(). And Alex i will see to ur suggestions .

But in the program code tic-tac-toe findmove();as its tricky can anyone explain to me which line of code is actually selecting the empty position for the computer’s first move, after the first move of the player(is it*BestMove = i); .And also at what condition does it escape the recursive function call and also what are these assignments for:

if ((p == COMPUTER) && (opv > *v))

{

*move = i;

*v = opv;

}

else if ((p == HUMAN) && (opv < *v))

{

*move = i;

*v = opv;

}

Guest
This topic is now closed to further replies.
×
×
  • Create New...