Examples of nextVariant()


Examples of com.sgfj.SGFNodeIterator.nextVariant()

                    SGFMove newMove = new SGFMove(cursorX, cursorY, game.colorToPlay);
                    SGFMove variantMove;
                    i.firstVariant(true);
                    do {
                        variantMove = i.current().getMoveProperty();
                    } while (!newMove.equals(variantMove) && i.nextVariant(true) != null);

                    if (!newMove.equals(variantMove))
                        return false;
                }
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

                        do {
                            if ((i.current().bits & SGFNode.GOOD_MOVE) != 0)
                                nGoodVariants++;
                            else if ((i.current().bits & SGFNode.BAD_MOVE) != 0)
                                nBadVariants++;
                        } while (i.nextVariant(true) != null);

                        // play response if there is good/bad hint
                        if (nGoodVariants > 0 || nBadVariants > 0) {
                            int k;
                            int mask;
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

                case Canvas.KEY_NUM7:
                    {
                        SGFNodeIterator i = game.kifuLastMove().iterator();
                        // skip to node with some variants
                        while (i.prev(true) != null
                                && i.nextVariant(false) == null
                                && i.prevVariant(false) == null)
                            // DO NOTHING
                            ;
                        if (!(i.nextVariant(false) == null && i.prevVariant(false) == null)
                                && i.current() != game.kifuLastMove()) {
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

                        while (i.prev(true) != null
                                && i.nextVariant(false) == null
                                && i.prevVariant(false) == null)
                            // DO NOTHING
                            ;
                        if (!(i.nextVariant(false) == null && i.prevVariant(false) == null)
                                && i.current() != game.kifuLastMove()) {
                            // play game to found node
                            while (i.current() != game.kifuLastMove())
                                game.prev();
                            notify = true;
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

                case Canvas.KEY_NUM9:
                    {
                        SGFNodeIterator i = game.kifuLastMove().iterator();
                        // skip to node with some variants
                        while (i.next(true) != null
                                && i.nextVariant(false) == null
                                && i.prevVariant(false) == null)
                            // DO NOTHING
                            ;
                        if (!(i.nextVariant(false) == null && i.prevVariant(false) == null)
                                && i.current() != game.kifuLastMove()) {
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

                        while (i.next(true) != null
                                && i.nextVariant(false) == null
                                && i.prevVariant(false) == null)
                            // DO NOTHING
                            ;
                        if (!(i.nextVariant(false) == null && i.prevVariant(false) == null)
                                && i.current() != game.kifuLastMove()) {
                            // play game to found node
                            while (i.current() != game.kifuLastMove())
                                game.next();
                            notify = true;
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

            do {
                SGFNode node = i.current();
                if ((node.bits & SGFNode.GOOD_MOVE) != 0) {
                    return setCursor(node);
                }
            } while (i.nextVariant(true) != null);
            // no good moves found, set cursor to any move
            return setCursor(i.current());
        }
        return false;
    }
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

            do {
                SGFNode node = i.current();
                if ((node.bits & SGFNode.GOOD_MOVE) != 0) {
                    return setCursor(node);
                }
            } while (i.nextVariant(true) != null);
            // no good moves found, set cursor to any move
            return setCursor(i.current());
        }
        return false;
    }
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

                    SGFMove newMove = new SGFMove(cursorX, cursorY, game.colorToPlay);
                    SGFMove variantMove;
                    i.firstVariant(true);
                    do {
                        variantMove = i.current().getMoveProperty();
                    } while (!newMove.equals(variantMove) && i.nextVariant(true) != null);

                    if (!newMove.equals(variantMove))
                        return false;
                }
View Full Code Here

Examples of com.sgfj.SGFNodeIterator.nextVariant()

                        do {
                            if ((i.current().bits & SGFNode.GOOD_MOVE) != 0)
                                nGoodVariants++;
                            else if ((i.current().bits & SGFNode.BAD_MOVE) != 0)
                                nBadVariants++;
                        } while (i.nextVariant(true) != null);

                        // play response if there is good/bad hint
                        if (nGoodVariants > 0 || nBadVariants > 0) {
                            int k;
                            int mask;
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.