Thursday, 12 December 2013

Phew...

Okay, I might actually have a functional idea right now: to use a recursive command instead of a recursive query where the program doesn't return anything, rather just completing an action.

In that case, I have an idea on how to do it, which is testing by if statements whether they have been kinged or not, and then testing whether they can go to the right or go to the left if that spot has not been taking out. And then, there's the jump, where the program will enter every time it can perform a jump.

The recursion will still keep going around until it reaches the end, or close to the end where that pawn's "possibleMoves" value will be determinant of how many jumps or spaces it can move. In another method, the greatest "possibleMoves" value will be compared, and the one that is the highest, the computer will perform the move.

In this case, the computer does not account for the possibility of the opponent eating the pawn, but that can be done with an if statement. That's if I'm doing this the right way, which I don't know if I am.

No comments:

Post a Comment