blob: 71f0802a8ab00b42e59722d265c7492895233cb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package ch.epfl.maze.physical.stragegies.picker;
import ch.epfl.maze.util.Direction;
import java.util.Set;
/**
* A simple decision maker with no guarantee of randomness.
*
* @author Pacien TRAN-GIRARD
*/
public interface SimplePicker extends BlindPicker {
@Override
default Direction pick(Set<Direction> choices) {
if (choices.isEmpty()) return FALLBACK_DIRECTION;
return choices.stream().findFirst().get();
}
}
|