From 90bd766f361083f6fd9e39ff080c83fcc606832f Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sat, 21 Nov 2015 10:44:42 +0100 Subject: Reformat imported code --- src/ch/epfl/maze/physical/Prey.java | 81 +++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 43 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 dc1b3b9..bb5b371 100644 --- a/src/ch/epfl/maze/physical/Prey.java +++ b/src/ch/epfl/maze/physical/Prey.java @@ -5,51 +5,46 @@ import ch.epfl.maze.util.Vector2D; /** * Prey that is killed by a predator when they meet each other in the labyrinth. - * */ abstract public class Prey extends Animal { - /** - * Constructs a prey with a specified position. - * - * @param position - * Position of the prey in the labyrinth - */ - - public Prey(Vector2D position) { - super(position); - // TODO - } - - /** - * Moves according to a random walk, used while not being hunted in a - * {@code MazeSimulation}. - * - */ - - @Override - public final Direction move(Direction[] choices) { - // TODO - return Direction.NONE; - } - - /** - * 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} - */ - - abstract public Direction move(Direction[] choices, Daedalus daedalus); + /** + * Constructs a prey with a specified position. + * + * @param position Position of the prey in the labyrinth + */ + + public Prey(Vector2D position) { + super(position); + // TODO + } + + /** + * Moves according to a random walk, used while not being hunted in a + * {@code MazeSimulation}. + */ + + @Override + public final Direction move(Direction[] choices) { + // TODO + return Direction.NONE; + } + + /** + * 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} + */ + + abstract public Direction move(Direction[] choices, Daedalus daedalus); } -- cgit v1.2.3