diff --git a/.idea/misc.xml b/.idea/misc.xml index 5af9c98..e77902f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,8 @@ + + + diff --git a/src/Tiles.java b/src/Tiles.java index 7abfc3d..82e2421 100644 --- a/src/Tiles.java +++ b/src/Tiles.java @@ -128,7 +128,15 @@ public class Tiles implements Drawable { void spawn_zombie() { if(num_enemies < 30) { - tileMap[rand.nextInt(80)][rand.nextInt(80)].character = new Enemy(window, 20); + int x = rand.nextInt(80); + int y = rand.nextInt(80); + if (x == 0) { + x = 1; + } + if (y == 0) { + y = 1; + } + tileMap[y][x].character = new Enemy(window, 20); num_enemies++; System.out.println("Number of Zombies: " + num_enemies); }