summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/physical/stragegies/reducer/ChoiceReducer.java
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2015-11-24 15:23:36 +0100
committerPacien TRAN-GIRARD2015-11-24 15:37:19 +0100
commit33e497e3083c8446588244c1fa9e69f70af05664 (patch)
tree3ef665e3c9478f196bb6d61dd15a71c0a9919216 /src/ch/epfl/maze/physical/stragegies/reducer/ChoiceReducer.java
parent6f2f503bbf75901273376c8c009a6b96886650c8 (diff)
downloadmaze-solver-33e497e3083c8446588244c1fa9e69f70af05664.tar.gz
Refactor Mouse strategy
Diffstat (limited to 'src/ch/epfl/maze/physical/stragegies/reducer/ChoiceReducer.java')
-rw-r--r--src/ch/epfl/maze/physical/stragegies/reducer/ChoiceReducer.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/ch/epfl/maze/physical/stragegies/reducer/ChoiceReducer.java b/src/ch/epfl/maze/physical/stragegies/reducer/ChoiceReducer.java
new file mode 100644
index 0000000..3cb744d
--- /dev/null
+++ b/src/ch/epfl/maze/physical/stragegies/reducer/ChoiceReducer.java
@@ -0,0 +1,34 @@
1package ch.epfl.maze.physical.stragegies.reducer;
2
3import ch.epfl.maze.physical.World;
4import ch.epfl.maze.util.Direction;
5import ch.epfl.maze.util.Vector2D;
6
7import java.util.Set;
8
9/**
10 * A choice filter that can exclude choices.
11 *
12 * @author Pacien TRAN-GIRARD
13 */
14public interface ChoiceReducer {
15
16 /**
17 * Reduces the Direction choices by eliminating the improper ones from the given choices.
18 *
19 * @param choices The choices left to the animal
20 * @return A subset of possible direction of the animal, chosen in {@code choices}
21 */
22 Set<Direction> reduce(Set<Direction> choices);
23
24 /**
25 * Reduces the Direction choices by eliminating the improper ones from the given choices.
26 * In this variation, the animal knows the world entirely. It can therefore
27 * use the position of other animals in the world to move more effectively.
28 *
29 * @param choices The choices left to the animal
30 * @return A subset of possible direction of the animal, chosen in {@code choices}
31 */
32 Set<Direction> reduce(Set<Direction> choices, World world);
33
34}