summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/physical/Predator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch/epfl/maze/physical/Predator.java')
-rw-r--r--src/ch/epfl/maze/physical/Predator.java24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/ch/epfl/maze/physical/Predator.java b/src/ch/epfl/maze/physical/Predator.java
index 8c340e8..7d30ce6 100644
--- a/src/ch/epfl/maze/physical/Predator.java
+++ b/src/ch/epfl/maze/physical/Predator.java
@@ -5,34 +5,18 @@ import ch.epfl.maze.util.Vector2D;
5 5
6/** 6/**
7 * Predator that kills a prey when they meet with each other in the labyrinth. 7 * Predator that kills a prey when they meet with each other in the labyrinth.
8 *
9 * @author Pacien TRAN-GIRARD
8 */ 10 */
9 11abstract public class Predator extends ProbabilisticAnimal {
10abstract public class Predator extends Animal {
11
12 /* constants relative to the Pac-Man game */
13 public static final int SCATTER_DURATION = 14;
14 public static final int CHASE_DURATION = 40;
15 12
16 /** 13 /**
17 * Constructs a predator with a specified position. 14 * Constructs a predator with a specified position.
18 * 15 *
19 * @param position Position of the predator in the labyrinth 16 * @param position Position of the predator in the labyrinth
20 */ 17 */
21
22 public Predator(Vector2D position) { 18 public Predator(Vector2D position) {
23 super(position); 19 super(position);
24 // TODO
25 }
26
27 /**
28 * Moves according to a <i>random walk</i>, used while not hunting in a
29 * {@code MazeSimulation}.
30 */
31
32 @Override
33 public final Direction move(Direction[] choices) {
34 // TODO
35 return Direction.NONE;
36 } 20 }
37 21
38 /** 22 /**
@@ -49,6 +33,6 @@ abstract public class Predator extends Animal {
49 * @param daedalus The world in which the animal moves 33 * @param daedalus The world in which the animal moves
50 * @return The next direction of the animal, chosen in {@code choices} 34 * @return The next direction of the animal, chosen in {@code choices}
51 */ 35 */
52
53 abstract public Direction move(Direction[] choices, Daedalus daedalus); 36 abstract public Direction move(Direction[] choices, Daedalus daedalus);
37
54} 38}