package de.gamezock.metacraft.data; public class Map { Tile[][] tiles; private float[][] heightmap; public Map() { int width = 5; int height = 5; heightmap = new float[width][height]; tiles = new Tile[width][height]; for(int i = 0; i < width; ++i) { for(int j = 0; j < height; ++j) { //heightmap[i][j] = ((i-2)*(i-2)+(j-2)*(j-2))*0.5f; heightmap[i][j] = 0; tiles[i][j] = new Tile(new TestTile()); } } } public Tile getTile(int x, int y) { return tiles[x][y]; } public float getTileHeight(int x, int y) { return heightmap[x][y]; } public int getWidth() { return heightmap.length; } public int getHeight() { return heightmap[0].length; } public int getTileSize() { return tiles[0][0].getData().getSize(); } }