Examples of GroupAnalyzer


Examples of com.barrybecker4.game.twoplayer.go.board.analysis.group.GroupAnalyzer

     * @return set of eyes in this group
     */
    private GoEyeSet findEyesFromCandidates(GoBoardPositionLists excludedSpaceLists) {
        GoEyeSet eyes = new GoEyeSet();
        boolean ownedByPlayer1 = group_.isOwnedByPlayer1();
        GroupAnalyzer groupAnalyzer = analyzerMap_.getAnalyzer(group_);

        Box innerBox = createBoxExcludingBorder(boundingBox_);
        for ( int r = innerBox.getMinRow(); r < innerBox.getMaxRow(); r++ ) {
            for ( int c = innerBox.getMinCol(); c < innerBox.getMaxCol(); c++ ) {

View Full Code Here

Examples of com.barrybecker4.game.twoplayer.go.board.analysis.group.GroupAnalyzer

            GoBoardPositionList exclusionList =
                    nbrAnalyzer_.findStringFromInitialPosition(space, groupOwnership, false,
                                                                NeighborType.NOT_FRIEND, boundingBox_);

            Iterator it = exclusionList.iterator();
            GroupAnalyzer groupAnalyzer = analyzerMap_.getAnalyzer(group_);

            while (it.hasNext()) {
                GoBoardPosition p = (GoBoardPosition)it.next();
                if (p.isOccupied()) {
                    // if its a very weak opponent (ie dead) then don't exclude it from the list
                    if (!groupAnalyzer.isTrueEnemy(p))  {
                        p.setVisited(false);
                        it.remove()// remove it from the list
                    }
                }
            }
View Full Code Here

Examples of com.barrybecker4.game.twoplayer.go.board.analysis.group.GroupAnalyzer

        return runPotential;
    }

    private boolean containsEnemy(boolean ownedByPlayer1, GoBoardPosition space) {
        GroupAnalyzer groupAnalyzer = analyzerMap_.getAnalyzer(groupString_.getGroup());
        return space.isOccupied() && space.getPiece().isOwnedByPlayer1() != ownedByPlayer1
                && groupAnalyzer.isTrueEnemy(space);
    }
View Full Code Here

Examples of com.barrybecker4.game.twoplayer.go.board.analysis.group.GroupAnalyzer

            GoGroupRenderer groupRenderer = new GoGroupRenderer(b, COLORMAP, (float) cellSize, getMargin(), g2);

            GroupAnalyzerMap map = new GroupAnalyzerMap();
            for (IGoGroup group : b.getGroups()) {

                GroupAnalyzer analyzer = new GroupAnalyzer(group, map);
                groupRenderer.drawGroupDecoration(analyzer);
            }
        }

        super.drawMarkers(board, players, g2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.