diff --git a/cicaprojekt/Game.java b/cicaprojekt/Game.java index ce52326..aeefed6 100644 --- a/cicaprojekt/Game.java +++ b/cicaprojekt/Game.java @@ -198,10 +198,7 @@ public class Game { } public void generateZPM() { - int temp = jaffa.getZPMCount() + oneill.getZPMCount(); - System.out.println(temp); if(((jaffa.getZPMCount() + oneill.getZPMCount()) % 2) == 0) { - System.out.println("cica"); Tile source = oneill.getCurrentTile(); Tile compare; for (int i = 0; i < dungeon.getMapHeight() * dungeon.getMapWidth(); i++) { @@ -210,12 +207,12 @@ public class Game { source = compare; } - while (!source.canHazZPM() && !source.hasZPM() && (source.playerBaseOnTile != null)) { + while (!source.canHazZPM()) { compare = source.getAdjacentTile(Direction.getRandom()); if (compare != null) - source = compare; + if(!compare.hasZPM() && (compare.playerBaseOnTile == null)) + source = compare; } - System.out.println(source.getX() + " " + source.getY()); source.setZPMOnTile(new ZPM()); } diff --git a/cicaprojekt/Scale.java b/cicaprojekt/Scale.java index 2a9a3ba..8f74d67 100644 --- a/cicaprojekt/Scale.java +++ b/cicaprojekt/Scale.java @@ -55,4 +55,9 @@ public class Scale extends Field { else gateConnected.setOpen(false); } + + @Override + public boolean canHazZPM() { + return false; + } }