Corridor added
This commit is contained in:
22
Zoelda/src/main/maps/Corridor.java
Normal file
22
Zoelda/src/main/maps/Corridor.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package main.maps;
|
||||||
|
|
||||||
|
import main.Tile;
|
||||||
|
|
||||||
|
public class Corridor extends Map {
|
||||||
|
|
||||||
|
public Corridor() {
|
||||||
|
super(5, 10);
|
||||||
|
|
||||||
|
for (int x = 0; x < map.length; x++) {
|
||||||
|
for (int y = 0; y < map[0].length; y++) {
|
||||||
|
if((y == 0 || x == 0 || y == 9 || x == 4) && x != 2 ) {
|
||||||
|
map[x][y] = new Tile(3, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
} else {
|
||||||
|
map[x][y] = new Tile(0, x, y);
|
||||||
|
add(map[x][y]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user