From 1d8742eff592effe93c304a2aa67d494f2218a6f Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Thu, 21 Jan 2016 13:02:29 +0100 Subject: Fix Daedalus reset --- src/ch/epfl/maze/physical/Daedalus.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ch/epfl') diff --git a/src/ch/epfl/maze/physical/Daedalus.java b/src/ch/epfl/maze/physical/Daedalus.java index 0179156..f1dc9ff 100644 --- a/src/ch/epfl/maze/physical/Daedalus.java +++ b/src/ch/epfl/maze/physical/Daedalus.java @@ -150,10 +150,10 @@ public final class Daedalus extends World { @Override public void reset() { this.predators.clear(); - this.predators.addAll(this.predatorHistory); + this.predatorHistory.forEach(p -> this.predators.add((Predator) p.copy())); this.preys.clear(); - this.preys.addAll(this.preyHistory); + this.preyHistory.forEach(p -> this.preys.add((Prey) p.copy())); } } -- cgit v1.2.3