- Spaces with a 0 (Empty)
- There is no Ko
But, there are other spaces that could be not allowed to be played, let's see suicidal rule:
In most common ruleset, suicide is forbidden, so for now it will be for my program (maybe some day I will do something for the other rulesets).
So, there is how I will implement it:
- The number of liberties of the group if I play this move == 0?
- If not, move is allowed
- if yes, try to kill groups of the other color.
- If kills, move is allowed
- if not, this is a suicide move and can't be played.
I just created a method to see if a move is suicide (this is my first aproach, not tested yet):
Maybe tomorrow I will continue coding, or today if I have some time (I wish I can).
No comments:
Post a Comment