Package org.iremake.common.model.map

Examples of org.iremake.common.model.map.MapPosition


        Dimension tileSize = scenario.getTileSize();
        int row = (int) (y * scenario.getNumberRows() - size.height / 2 / tileSize.height);
        int column = (int) (x * scenario.getNumberColumns() - size.width / 2 / tileSize.width);
        row = Math.max(row, 0);
        column = Math.max(column, 0);
        MapPosition p = new MapPosition(row, column);
        if (!p.equals(offset)) {
            offset.setFrom(p);
            repaint();
        }
    }
View Full Code Here


        }

        // traverse map and store index for each nation or Max value if ther eis no nation (sea)
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
                Nation nation = scenario.getNationAt(new MapPosition(row, column));
                if (nation != null) {
                    // put the nations ID
                    politicalMap[row][column] = nationIDs.get(nation);
                } else {
                    // it's sea
View Full Code Here

TOP

Related Classes of org.iremake.common.model.map.MapPosition

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.