blob: e3876282aabde85e9c9d32b217308644d445d059 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package de.gamezock.metacraft.data;
public class Map {
private Tile[][] tiles;
private float[][] heightmap;
private int width, height;
private int tileSize;
public Map() {
width = height = 1;
heightmap = new float[width][height];
heightmap[0][0] = 0;
tiles = new Tile[width][height];
tiles[0][0] = new Tile(new TestTile());
tileSize = tiles[0][0].getData().getSize();
}
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 width;
}
public int getHeight() {
return height;
}
public int getTileSize() {
return tileSize;
}
}
|