blob: c7e8833596914f3f226175a8097c704ef8e44c35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package ch.epfl.maze.physical.stragegies.reducer;
import ch.epfl.maze.physical.Daedalus;
import ch.epfl.maze.util.Direction;
import java.util.Set;
/**
* A choice filter that can exclude choices.
*
* @author Pacien TRAN-GIRARD
*/
public interface ChoiceReducer {
/**
* Reduces the Direction choices by eliminating the improper ones from the given choices.
*
* @param choices The choices left to the animal
* @return A subset of possible direction of the animal, chosen in {@code choices}
*/
Set<Direction> reduce(Set<Direction> choices);
/**
* Reduces the Direction choices by eliminating the improper ones from the given choices.
* In this variation, the animal knows the world entirely. It can therefore
* use the position of other animals in the world to move more effectively.
*
* @param choices The choices left to the animal
* @param daedalus The daedalus in which the animal moves
* @return A subset of possible direction of the animal, chosen in {@code choices}
*/
Set<Direction> reduce(Set<Direction> choices, Daedalus daedalus);
}
|