* @param stone that was removed.
* @param string that the stone belonged to.
*/
private void splitStringsIfNeeded(GoBoardPosition stone, IGoString string) {
IGoGroup group = string.getGroup();
GoBoardPositionSet nbrs =
nbrAnalyzer_.getNobiNeighbors( stone, group.isOwnedByPlayer1(), NeighborType.FRIEND );
if ( nbrs.size() > 1 ) {
GoBoardPositionLists lists = new GoBoardPositionLists();
GoBoardPosition firstNbr = nbrs.getOneMember();
GoBoardPositionList stones = nbrAnalyzer_.findStringFromInitialPosition( firstNbr, false );
lists.add( stones );
for ( GoBoardPosition nbrStone : nbrs ) {
if ( !nbrStone.isVisited() ) {
GoBoardPositionList stones1 = nbrAnalyzer_.findStringFromInitialPosition( nbrStone, false );
IGoString newString = new GoString( stones1, getBoard() );
group.addMember(newString);
lists.add( stones1 );
}
}
lists.unvisitPositionsInLists();
}