summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/physical/Prey.java
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2015-11-21 10:44:42 +0100
committerPacien TRAN-GIRARD2015-11-21 10:44:42 +0100
commit90bd766f361083f6fd9e39ff080c83fcc606832f (patch)
treedf81a931c9565a4b227068680087f58fdace1859 /src/ch/epfl/maze/physical/Prey.java
parent655ac88f4e73b2df532a451aedf5a561ea1b0d2c (diff)
downloadmaze-solver-90bd766f361083f6fd9e39ff080c83fcc606832f.tar.gz
Reformat imported code
Diffstat (limited to 'src/ch/epfl/maze/physical/Prey.java')
-rw-r--r--src/ch/epfl/maze/physical/Prey.java81
1 files changed, 38 insertions, 43 deletions
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;
5 5
6/** 6/**
7 * Prey that is killed by a predator when they meet each other in the labyrinth. 7 * Prey that is killed by a predator when they meet each other in the labyrinth.
8 *
9 */ 8 */
10 9
11abstract public class Prey extends Animal { 10abstract public class Prey extends Animal {
12 11
13 /** 12 /**
14 * Constructs a prey with a specified position. 13 * Constructs a prey with a specified position.
15 * 14 *
16 * @param position 15 * @param position Position of the prey in the labyrinth
17 * Position of the prey in the labyrinth 16 */
18 */ 17
19 18 public Prey(Vector2D position) {
20 public Prey(Vector2D position) { 19 super(position);
21 super(position); 20 // TODO
22 // TODO 21 }
23 } 22
24 23 /**
25 /** 24 * Moves according to a <i>random walk</i>, used while not being hunted in a
26 * Moves according to a <i>random walk</i>, used while not being hunted in a 25 * {@code MazeSimulation}.
27 * {@code MazeSimulation}. 26 */
28 * 27
29 */ 28 @Override
30 29 public final Direction move(Direction[] choices) {
31 @Override 30 // TODO
32 public final Direction move(Direction[] choices) { 31 return Direction.NONE;
33 // TODO 32 }
34 return Direction.NONE; 33
35 } 34 /**
36 35 * Retrieves the next direction of the animal, by selecting one choice among
37 /** 36 * the ones available from its position.
38 * Retrieves the next direction of the animal, by selecting one choice among 37 * <p>
39 * the ones available from its position. 38 * In this variation, the animal knows the world entirely. It can therefore
40 * <p> 39 * use the position of other animals in the daedalus to evade predators more
41 * In this variation, the animal knows the world entirely. It can therefore 40 * effectively.
42 * use the position of other animals in the daedalus to evade predators more 41 *
43 * effectively. 42 * @param choices The choices left to the animal at its current position (see
44 * 43 * {@link ch.epfl.maze.physical.World#getChoices(Vector2D)
45 * @param choices 44 * World.getChoices(Vector2D)})
46 * The choices left to the animal at its current position (see 45 * @param daedalus The world in which the animal moves
47 * {@link ch.epfl.maze.physical.World#getChoices(Vector2D) 46 * @return The next direction of the animal, chosen in {@code choices}
48 * World.getChoices(Vector2D)}) 47 */
49 * @param daedalus 48
50 * The world in which the animal moves 49 abstract public Direction move(Direction[] choices, Daedalus daedalus);
51 * @return The next direction of the animal, chosen in {@code choices}
52 */
53
54 abstract public Direction move(Direction[] choices, Daedalus daedalus);
55} 50}