Examples of trimTo()


Examples of org.tools.utils.BitBuffer.trimTo()

        Node child = parent.getFirstChild("Maps");

        // readingt of terrain map
        String content = child.getFirstChild("Terrains").getValue();
        BitBuffer terbuffer = BitBuffer.fromXMLString(content);
        terbuffer.trimTo(BITSIZE_TERRAINID * size);

        // readingt of terrain map
        content = child.getFirstChild("Resources").getValue();
        BitBuffer resbuffer = BitBuffer.fromXMLString(content);
        resbuffer.trimTo((BITSIZE_RESOURCEID + 1) * size);
 
View Full Code Here

Examples of org.tools.utils.BitBuffer.trimTo()

        terbuffer.trimTo(BITSIZE_TERRAINID * size);

        // readingt of terrain map
        content = child.getFirstChild("Resources").getValue();
        BitBuffer resbuffer = BitBuffer.fromXMLString(content);
        resbuffer.trimTo((BITSIZE_RESOURCEID + 1) * size);

        // reading of provinces map
        // TODO if no such element returns null and getValue will throw exception
        content = child.getFirstChild("Provinces").getValue();
        BitBuffer probuffer = BitBuffer.fromXMLString(content);
View Full Code Here

Examples of org.tools.utils.BitBuffer.trimTo()

        // reading of provinces map
        // TODO if no such element returns null and getValue will throw exception
        content = child.getFirstChild("Provinces").getValue();
        BitBuffer probuffer = BitBuffer.fromXMLString(content);
        probuffer.trimTo(BITSIZE_PROVINCEID * size);

        // reading of railroads map
        content = child.getFirstChild("Railroads").getValue();
        BitBuffer railbuffer = BitBuffer.fromXMLString(content);
        railbuffer.trimTo(BITSIZE_RAILROAD_CONFIG * size);
 
View Full Code Here

Examples of org.tools.utils.BitBuffer.trimTo()

        probuffer.trimTo(BITSIZE_PROVINCEID * size);

        // reading of railroads map
        content = child.getFirstChild("Railroads").getValue();
        BitBuffer railbuffer = BitBuffer.fromXMLString(content);
        railbuffer.trimTo(BITSIZE_RAILROAD_CONFIG * size);

        // reading of rivers map
        content = child.getFirstChild("Rivers").getValue();
        BitBuffer riverbuffer = BitBuffer.fromXMLString(content);
        riverbuffer.trimTo(BITSIZE_RIVERID * size);
 
View Full Code Here

Examples of org.tools.utils.BitBuffer.trimTo()

        railbuffer.trimTo(BITSIZE_RAILROAD_CONFIG * size);

        // reading of rivers map
        content = child.getFirstChild("Rivers").getValue();
        BitBuffer riverbuffer = BitBuffer.fromXMLString(content);
        riverbuffer.trimTo(BITSIZE_RIVERID * size);

        // TODO test size of string with size
        // TODO more checks (positivity)
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
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.