Package com.sgfj

Examples of com.sgfj.SGFNode.addProperty()


            try {
                node.getCommentProperty();
                fail("SGFPropertyNotFoundException expected!");
            } catch (SGFPropertyNotFoundException e) {
            }
            node.addProperty(new SGFTextProperty(SGFPropertyName.C, "a".toCharArray()));
            node.addProperty(new SGFTextProperty(SGFPropertyName.C, "b".toCharArray()));
            assertEquals("ab", node.getCommentProperty());
        } catch (Exception e) {
            e.printStackTrace();
            fail("No exceptions are expected.");
View Full Code Here


                node.getCommentProperty();
                fail("SGFPropertyNotFoundException expected!");
            } catch (SGFPropertyNotFoundException e) {
            }
            node.addProperty(new SGFTextProperty(SGFPropertyName.C, "a".toCharArray()));
            node.addProperty(new SGFTextProperty(SGFPropertyName.C, "b".toCharArray()));
            assertEquals("ab", node.getCommentProperty());
        } catch (Exception e) {
            e.printStackTrace();
            fail("No exceptions are expected.");
        }
View Full Code Here

    }

    public void testWriteSynth() {
        try {
            SGFNode root = new SGFNode();
            root.addProperty(new SGFIntProperty(SGFPropertyName.SZ, 9));
            root.addProperty(new SGFIntProperty(SGFPropertyName.HA, 0));

            SGFNode n;
            String s;
View Full Code Here

    public void testWriteSynth() {
        try {
            SGFNode root = new SGFNode();
            root.addProperty(new SGFIntProperty(SGFPropertyName.SZ, 9));
            root.addProperty(new SGFIntProperty(SGFPropertyName.HA, 0));

            SGFNode n;
            String s;

            n = new SGFNode();
View Full Code Here

    public void setHandicap(int handicap) {
        super.setHandicap(handicap);

        SGFNode head = kifu.first(false);
        head.addProperty(new SGFIntProperty(SGFPropertyName.HA, handicap));

        for (int pos = 0; pos < board.maxPos(); pos ++) {
            byte color = board.get(pos);
            if (color != Board.NONE) {
                SGFPropertyName name;
View Full Code Here

                SGFPropertyName name;
                if (color == Board.WHITE)
                    name = SGFPropertyName.AW;
                else
                    name = SGFPropertyName.AB;
                head.addProperty(new SGFPointProperty(name, board.xy(pos)));
            }
        }
    }

View Full Code Here

    }

    public void testWriteSynth() {
        try {
            SGFNode root = new SGFNode();
            root.addProperty(new SGFIntProperty(SGFPropertyName.SZ, 9));
            root.addProperty(new SGFIntProperty(SGFPropertyName.HA, 0));

            SGFNode n;
            String s;
View Full Code Here

    public void testWriteSynth() {
        try {
            SGFNode root = new SGFNode();
            root.addProperty(new SGFIntProperty(SGFPropertyName.SZ, 9));
            root.addProperty(new SGFIntProperty(SGFPropertyName.HA, 0));

            SGFNode n;
            String s;

            n = new SGFNode();
View Full Code Here

    }

    public void init(int size) {
        super.init(size);
        SGFNode head = new SGFNode();
        head.addProperty(new SGFIntProperty(SGFPropertyName.GM, 1));
        head.addProperty(new SGFIntProperty(SGFPropertyName.FF, 4));
        head.addProperty(new SGFTextProperty(SGFPropertyName.CA, charset.toCharArray()));
        head.addProperty(new SGFTextProperty(SGFPropertyName.AP, application.toCharArray()));
        head.addProperty(new SGFIntProperty(SGFPropertyName.SZ, size));
        kifu = head.iterator();
View Full Code Here

    public void init(int size) {
        super.init(size);
        SGFNode head = new SGFNode();
        head.addProperty(new SGFIntProperty(SGFPropertyName.GM, 1));
        head.addProperty(new SGFIntProperty(SGFPropertyName.FF, 4));
        head.addProperty(new SGFTextProperty(SGFPropertyName.CA, charset.toCharArray()));
        head.addProperty(new SGFTextProperty(SGFPropertyName.AP, application.toCharArray()));
        head.addProperty(new SGFIntProperty(SGFPropertyName.SZ, size));
        kifu = head.iterator();
    }
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.