diff options
Diffstat (limited to 'src/ch/epfl/maze/physical/stragegies/reducer/CaseReducer.java')
-rw-r--r-- | src/ch/epfl/maze/physical/stragegies/reducer/CaseReducer.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ch/epfl/maze/physical/stragegies/reducer/CaseReducer.java b/src/ch/epfl/maze/physical/stragegies/reducer/CaseReducer.java index 837bd4b..71de287 100644 --- a/src/ch/epfl/maze/physical/stragegies/reducer/CaseReducer.java +++ b/src/ch/epfl/maze/physical/stragegies/reducer/CaseReducer.java | |||
@@ -1,6 +1,6 @@ | |||
1 | package ch.epfl.maze.physical.stragegies.reducer; | 1 | package ch.epfl.maze.physical.stragegies.reducer; |
2 | 2 | ||
3 | import ch.epfl.maze.physical.World; | 3 | import ch.epfl.maze.physical.Daedalus; |
4 | import ch.epfl.maze.util.Direction; | 4 | import ch.epfl.maze.util.Direction; |
5 | 5 | ||
6 | import java.util.Set; | 6 | import java.util.Set; |
@@ -16,17 +16,17 @@ public interface CaseReducer extends ChoiceReducer { | |||
16 | /** | 16 | /** |
17 | * Checks if the given choice should be kept or excluded by the filter. | 17 | * Checks if the given choice should be kept or excluded by the filter. |
18 | * | 18 | * |
19 | * @param choice A Direction | 19 | * @param choice A Direction |
20 | * @param world The World | 20 | * @param daedalus The Daedalus |
21 | * @return T(The filter should keep the given choice) | 21 | * @return T(The filter should keep the given choice) |
22 | */ | 22 | */ |
23 | boolean keepChoice(Direction choice, World world); | 23 | boolean keepChoice(Direction choice, Daedalus daedalus); |
24 | 24 | ||
25 | @Override | 25 | @Override |
26 | default Set<Direction> reduce(Set<Direction> choices, World world) { | 26 | default Set<Direction> reduce(Set<Direction> choices, Daedalus daedalus) { |
27 | return choices | 27 | return choices |
28 | .stream() | 28 | .stream() |
29 | .filter(choice -> this.keepChoice(choice, world)) | 29 | .filter(choice -> this.keepChoice(choice, daedalus)) |
30 | .collect(Collectors.toSet()); | 30 | .collect(Collectors.toSet()); |
31 | } | 31 | } |
32 | 32 | ||