Commit 46d652c9 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

correct wrong assertion test: checks if peds are outside of the bound.

parent 8f79cc5a
Pipeline #55679 passed with stage
in 47 seconds
......@@ -227,7 +227,7 @@ public class Simulation {
private boolean assertAllPedestrianInBounds() {
Rectangle2D.Double bounds = topography.getBounds();
Collection<Pedestrian> peds = topography.getElements(Pedestrian.class);
return peds.stream().map(ped -> ped.getPosition()).anyMatch(pos -> !bounds.contains(pos.getX(), pos.getY()));
return peds.stream().map(ped -> ped.getPosition()).allMatch(pos -> bounds.contains(pos.getX(), pos.getY()));
}
private SimulationState initialSimulationState() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment