Search

Friday, August 24, 2012

Day 16: Ko, part III



Well, something like a ko was implemented in the program, but still couldn't test it.

First I changed tryToKill from void to integer and return number of killed stones:



So now, main loop will take the result when killing stones.

And now I have to pass as parameters the last board, number of killed stones in the last turn and the color to evaluate. So I changed the getPossibleMoves method:



Now I know that the engine should send more parameters to the getPossibleMoves method of the ruleset:


So, last thing to show is the "isKo" method, that returns true if the move is a ko and false if it is not:

Next: I know I should start with suicide rule, but... I want to see it on a better graphic interface so I will work on GTP and loging.

No comments:

Post a Comment