From 480d763f95bb08815cd6c8a7b93dc3df7001864f Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Thu, 2 Jul 2015 18:21:17 +0200 Subject: [PATCH] fix bug with newGen --- .gitignore | 2 ++ core/src/logic/World.java | 1 + 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 47454ee..803467a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.nb-gradle/profiles/private/* + ## Java *.class diff --git a/core/src/logic/World.java b/core/src/logic/World.java index 363e53e..5b9e5a5 100644 --- a/core/src/logic/World.java +++ b/core/src/logic/World.java @@ -59,6 +59,7 @@ public class World { public void newGen(boolean restart) { elements.removeAll(creatures); graveyard.addAll(creatures); + creatures.clear(); Comparator creatureComp = new Comparator() { @Override