Package com.tinygo.logic

Examples of com.tinygo.logic.DocumentedGame


        if (srProb)
            probEnum.save(dout);
    }

    public void restore(DataInputStream din) throws IOException {
        DocumentedGame newGame = null;
        try {
            String sgf = din.readUTF();

            if (sgf.length() > 0) {
                SGFParser parser = new SGFParser(sgf);
                SGFNode newTree = parser.parse();
                newGame = new DocumentedGame(newTree);

                int depth = din.readShort();
                while (depth-- > 0) {
                    int varNumber = din.readShort();
                    while (newGame.prevVariant())
                        // DO NOTHING
                        ;
                    while (varNumber-- > 0)
                        newGame.nextVariant();
                    if (depth > 0)
                        newGame.next();
                }
            }
        } catch (SGFException e) {
            //#ifdef debug
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.tinygo.logic.DocumentedGame

Copyright © 2018 www.massapicom. 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.