package ch.epfl.maze.physical; import ch.epfl.maze.util.Direction; import ch.epfl.maze.util.Vector2D; import java.util.Arrays; import java.util.EnumSet; import java.util.Set; /** * @author Pacien TRAN-GIRARD */ public interface DaedalusAware { /** * Retrieves the next direction of the animal, by selecting one choice among * the ones available from its position. *
* In this variation, the animal knows the world entirely. It can therefore
* use the position of other animals in the daedalus to hunt or to evade predators
* more effectively.
*
* @param choices The choices left to the animal at its current position (see
* {@link ch.epfl.maze.physical.World#getChoices(Vector2D)
* World.getChoices(Vector2D)})
* @param daedalus The world in which the animal moves
* @return The next direction of the animal, chosen in {@code choices}
* @implNote Not abstract for compatibility purpose (in order not to break tests)
*/
default Direction move(Set
* In this variation, the animal knows the world entirely. It can therefore
* use the position of other animals in the daedalus to hunt or to evade predators
* more effectively.
*
* @param choices The choices left to the animal at its current position (see
* {@link ch.epfl.maze.physical.World#getChoices(Vector2D)
* World.getChoices(Vector2D)})
* @param daedalus The world in which the animal moves
* @return The next direction of the animal, chosen in {@code choices}
* @apiNote Not final for compatibility purpose (in order not to break tests)
* @deprecated Use @code{Direction move(Set