Jump to content
Science Forums

Can anyone help me figure out findmove() in my program code


Recommended Posts

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;

}

Link to comment
Share on other sites

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