Package org.iremake.common.model.map

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


        this.rows = rows;
        this.columns = columns;
        map = new Tile[rows][columns];
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
                map[row][column] = new Tile();
            }
        }
        fireScenarioChanged();
    }
View Full Code Here


        // 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++) {
                Tile tile = new Tile();
                tile.terrainID = terbuffer.get(BITSIZE_TERRAINID);
                tile.resourceID = resbuffer.get(BITSIZE_RESOURCEID);
                tile.resourceVisible = resbuffer.get();
                tile.provinceID = probuffer.get(BITSIZE_PROVINCEID);
                tile.railroadConfig = railbuffer.get(BITSIZE_RAILROAD_CONFIG);
View Full Code Here

        // set terrain
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
                MapPosition pos = new MapPosition(row, column);
                Tile tile = scenario.getTileAt(pos);
                int i = column + row * columns;

                // set terrains
                // sea
                if (terrain_underlay[i] == 5) {
View Full Code Here

     */
    public void update(MapPosition p, ServerScenario scenario) {
        if (p.isOff()) {
            reset();
        } else {
            Tile t = scenario.getTileAt(p);
            tile.setText("Tile: " + Integer.toString(p.row) + ", " + Integer.toString(p.column));
            terrain.setText("Terrain: " + Settings.getTerrainName(t.terrainID));
            resource.setText("Resource: " + Settings.getResourceName(t.resourceID));
            nation.setText("Nation: " + scenario.getNationAt(p));
            province.setText("Province: " + scenario.getProvinceAt(p));
View Full Code Here

TOP

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

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.