Support for variable World size

This commit is contained in:
simon
2018-01-14 12:02:32 -05:00
parent 9bb0dc9034
commit 4293fc0315
9 changed files with 64 additions and 112 deletions

View File

@@ -66,7 +66,7 @@ public class WorldCreationListener implements GameEventListener {
//Also spawn a radio tower in the same World
Point p = world.getRandomPassableTile();
if (p != null) {
while (p.x == 0 || p.x == World.WORLD_SIZE - 1 || p.y == World.WORLD_SIZE - 1 || p.y == 0) {
while (p.x == 0 || p.x == world.getWorldSize() - 1 || p.y == world.getWorldSize() - 1 || p.y == 0) {
p = world.getRandomPassableTile();
if (p == null) {