summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/simulation/DaedalusSimulation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch/epfl/maze/simulation/DaedalusSimulation.java')
-rw-r--r--src/ch/epfl/maze/simulation/DaedalusSimulation.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ch/epfl/maze/simulation/DaedalusSimulation.java b/src/ch/epfl/maze/simulation/DaedalusSimulation.java
index 8b60b57..90ff4a7 100644
--- a/src/ch/epfl/maze/simulation/DaedalusSimulation.java
+++ b/src/ch/epfl/maze/simulation/DaedalusSimulation.java
@@ -13,7 +13,6 @@ import java.util.*;
13 * predator and prey in a Daedalus, as well as the animation by notifying 13 * predator and prey in a Daedalus, as well as the animation by notifying
14 * changes to it. The simulation finishes when every prey has been caught. 14 * changes to it. The simulation finishes when every prey has been caught.
15 */ 15 */
16
17public final class DaedalusSimulation implements Simulation { 16public final class DaedalusSimulation implements Simulation {
18 17
19 /* limit to the step counter, over which the animals are considered lost */ 18 /* limit to the step counter, over which the animals are considered lost */
@@ -33,7 +32,6 @@ public final class DaedalusSimulation implements Simulation {
33 * 32 *
34 * @param daedalus The daedalus to simulate 33 * @param daedalus The daedalus to simulate
35 */ 34 */
36
37 public DaedalusSimulation(Daedalus daedalus) { 35 public DaedalusSimulation(Daedalus daedalus) {
38 mDaedalus = daedalus; 36 mDaedalus = daedalus;
39 mArrivalTimes = new TreeMap<Integer, List<Prey>>(Collections.reverseOrder()); 37 mArrivalTimes = new TreeMap<Integer, List<Prey>>(Collections.reverseOrder());
@@ -162,7 +160,6 @@ public final class DaedalusSimulation implements Simulation {
162 * @param listener The listener to which the function will notify the changes 160 * @param listener The listener to which the function will notify the changes
163 * (can be null) 161 * (can be null)
164 */ 162 */
165
166 private void movePredators(Animation listener) { 163 private void movePredators(Animation listener) {
167 List<Predator> predators = mDaedalus.getPredators(); 164 List<Predator> predators = mDaedalus.getPredators();
168 for (int i = 0; i < predators.size(); i++) { 165 for (int i = 0; i < predators.size(); i++) {
@@ -231,7 +228,6 @@ public final class DaedalusSimulation implements Simulation {
231 * @param listener The listener to which the function will notify the changes 228 * @param listener The listener to which the function will notify the changes
232 * (can be null) 229 * (can be null)
233 */ 230 */
234
235 private void movePreys(Animation listener) { 231 private void movePreys(Animation listener) {
236 List<Prey> preys = mDaedalus.getPreys(); 232 List<Prey> preys = mDaedalus.getPreys();
237 Action action; 233 Action action;
@@ -303,7 +299,6 @@ public final class DaedalusSimulation implements Simulation {
303 * @param listener The listener to which the function will notify the changes 299 * @param listener The listener to which the function will notify the changes
304 * (can be null) 300 * (can be null)
305 */ 301 */
306
307 private void checkCollisions(Animation listener) { 302 private void checkCollisions(Animation listener) {
308 List<Predator> predators = mDaedalus.getPredators(); 303 List<Predator> predators = mDaedalus.getPredators();
309 List<Prey> preys = mDaedalus.getPreys(); 304 List<Prey> preys = mDaedalus.getPreys();
@@ -346,4 +341,5 @@ public final class DaedalusSimulation implements Simulation {
346 } 341 }
347 } 342 }
348 } 343 }
344
349} 345}