Evil Tesuji
My jouney to the secrets of go.
Search
Tuesday, October 2, 2012
Day 55: Errors in logic...
When I saw the error that I posted before, I just started to log all. Now I think I understand where this is happening:
The tryToKill function:
public int tryToKill(int color){ Ruleset ruleset=new Ruleset(); int killed=0; //return the number of killed stones ArrayList
group=new ArrayList<>(); ArrayList
liberties; boolean isDead; for(int i=0;i
Here should be the problem. And I guess there is a problem counting libertir There is the problem. And what I see is that tryToKill maybe is changing the main board.
public ArrayList
getLiberties(ArrayList
group, Board board){ //given a group, I should count liberties. ArrayList
liberties=new ArrayList<>(); //int groupPointer=0; for(int i=0;i
More news soon...
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment