package ch.epfl.maze.physical; import ch.epfl.maze.util.Direction; import ch.epfl.maze.util.Vector2D; /** * Predator that kills a prey when they meet with each other in the labyrinth. * * @author Pacien TRAN-GIRARD */ abstract public class Predator extends ProbabilisticAnimal { /** * Constructs a predator with a specified position. * * @param position Position of the predator in the labyrinth */ public Predator(Vector2D position) { super(position); } /** * 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 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} */ abstract public Direction move(Direction[] choices, Daedalus daedalus); }