Examples of SGFPropertyName


Examples of com.sgfj.SGFPropertyName

    }

    public void testToCharArray() {
        char[] ca1 = new char[]{'B'};
        char[] ca2 = new char[]{'S', 'Z'};
        SGFPropertyName n1 = SGFParser.parsePropertyName(ca1);
        assertTrue(equal(ca1, n1.toCharArray()));
        n1 = SGFParser.parsePropertyName(ca2);
        assertTrue(equal(ca2, n1.toCharArray()));
    }
View Full Code Here

Examples of com.sgfj.SGFPropertyName

        assertTrue(SGFPropertyName.AB.allowingRange());
        assertFalse(SGFPropertyName.SZ.allowingRange());
    }

    public void testParse() {
        SGFPropertyName n1 = SGFParser.parsePropertyName("SZ".toCharArray());
        assertSame(SGFPropertyName.SZ, n1);

        n1 = SGFParser.parsePropertyName("C".toCharArray());
        assertSame(SGFPropertyName.C, n1);

        char[] unknown = new char[]{'X', 'X'};
        SGFPropertyName n2 = SGFParser.parsePropertyName(unknown);
        assertTrue(equal(unknown, n2.toCharArray()));
        SGFPropertyName n3 = SGFParser.parsePropertyName(unknown);
        assertSame(n3, n2);
    }
View Full Code Here

Examples of com.sgfj.SGFPropertyName

        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;
                if (color == Board.WHITE)
                    name = SGFPropertyName.AW;
                else
                    name = SGFPropertyName.AB;
                head.addProperty(new SGFPointProperty(name, board.xy(pos)));
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.