summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tesseract/World.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tesseract/World.java b/src/tesseract/World.java
index 1919e5e..61dce69 100644
--- a/src/tesseract/World.java
+++ b/src/tesseract/World.java
@@ -494,10 +494,16 @@ public class World implements Observer {
}
}
}
+
+ /*if ( indexToRemove >= 0) {
+ myObjects.remove(indexToRemove);
+ System.out.println("Remove index: " + indexToRemove);
+ }*/
//if the object leaves the world, remove it from myObjects list) {
if (indexesToRemove.size() > 0) {
- for (int i = 0; i < indexesToRemove.size(); i++) {
- myObjects.remove(indexesToRemove.get(i));
+ for (Integer k : indexesToRemove) {
+ int i = k;
+ myObjects.remove(i);
System.out.println("Remove index: " + i);
}
indexesToRemove.clear();