package ch.epfl.maze.physical.stragegies.reducer; import ch.epfl.maze.physical.World; import ch.epfl.maze.util.Direction; import ch.epfl.maze.util.Vector2D; 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 reduce(Set 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 * @return A subset of possible direction of the animal, chosen in {@code choices} */ Set reduce(Set choices, World world); }