From f312719bf9df140a22406a4e40c5221a86cd8073 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Tue, 24 Nov 2015 21:56:22 +0100 Subject: Refactor Daedalus residence --- src/ch/epfl/maze/physical/Prey.java | 46 +------------------------------------ 1 file changed, 1 insertion(+), 45 deletions(-) (limited to 'src/ch/epfl/maze/physical/Prey.java') diff --git a/src/ch/epfl/maze/physical/Prey.java b/src/ch/epfl/maze/physical/Prey.java index ff760c5..0ad62ff 100644 --- a/src/ch/epfl/maze/physical/Prey.java +++ b/src/ch/epfl/maze/physical/Prey.java @@ -1,19 +1,14 @@ 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; - /** * Prey that is killed by a predator when they meet each other in the labyrinth. * * @author EPFL * @author Pacien TRAN-GIRARD */ -abstract public class Prey extends ProbabilisticAnimal { +abstract public class Prey extends Animal implements DaedalusAware { /** * Constructs a prey with a specified position. @@ -24,43 +19,4 @@ abstract public class Prey extends ProbabilisticAnimal { 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 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) - */ - public Direction move(Set choices, Daedalus daedalus) { - return null; - } - - /** - * 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 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 choices, Daedalus daedalus)} instead - */ - public Direction move(Direction[] choices, Daedalus daedalus) { - return this.move(EnumSet.copyOf(Arrays.asList(choices)), daedalus); - } - } -- cgit v1.2.3