forked from IF-LK-2020/zulda
21 lines
415 B
Java
21 lines
415 B
Java
package main;
|
|
|
|
import ea.Knoten;
|
|
|
|
public class Map extends Knoten {
|
|
|
|
private Tile[][] map;
|
|
|
|
public Map() {
|
|
map = new Tile[11][7];
|
|
for (int x = 0; x < map.length; x++) {
|
|
for (int y = 0; y < map[0].length; y++) {
|
|
map[x][y] = new Tile((x == 0 || y == 0 || x == map.length - 1 || y == map[0].length - 1) ? 1 : 0);
|
|
map[x][y].setX(x * 96);
|
|
map[x][y].setY(y * 96);
|
|
add(map[x][y]);
|
|
}
|
|
}
|
|
}
|
|
}
|