Examples of Nation


Examples of org.iremake.common.model.Nation

        colors = new int[numNations];

        // traverse nations by index and store names as well as index for each nation
        Map<Nation, Integer> nationIDs = new HashMap<>(numNations);
        for (int i = 0; i < numNations; i++) {
            Nation nation = nations.getElementAt(i);
            nationIDs.put(nation, i);
            names[i] = nation.getProperty(Nation.KEY_NAME);
            colors[i] = nation.getColor().getRGB();
        }

        // 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
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.