* @return a HashSet of the groups that are enemies of this group
*/
private Set getEnemyGroupNeighbors(GoBoardPositionSet groupStones, boolean isPlayer1) {
GoProfiler.getInstance().startGetEnemyGroupNbrs();
GoGroupSet enemyNbrs = new GoGroupSet();
NeighborAnalyzer nbrAnalyzer = new NeighborAnalyzer(board);
// for every stone in the group.
for (GoBoardPosition stone : groupStones) {
GoBoardPositionSet nbrs = nbrAnalyzer.findGroupNeighbors(stone, false);
addEnemyNeighborsForStone(enemyNbrs, stone, nbrs, isPlayer1);
}
GoProfiler.getInstance().stopGetEnemyGroupNbrs();
return enemyNbrs;
}