From 9811ea74bcc9793a1ba6659aab850259e5671763 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 22 Nov 2015 18:56:56 +0100 Subject: Implement Predator and distinguish derived GhostPredator --- src/ch/epfl/maze/physical/GhostPredator.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/ch/epfl/maze/physical/GhostPredator.java (limited to 'src/ch/epfl/maze/physical/GhostPredator.java') diff --git a/src/ch/epfl/maze/physical/GhostPredator.java b/src/ch/epfl/maze/physical/GhostPredator.java new file mode 100644 index 0000000..34b8c4f --- /dev/null +++ b/src/ch/epfl/maze/physical/GhostPredator.java @@ -0,0 +1,25 @@ +package ch.epfl.maze.physical; + +import ch.epfl.maze.util.Vector2D; + +/** + * Predator ghost that have two different modes and a home position in the labyrinth. + * + * @author Pacien TRAN-GIRARD + */ +abstract public class GhostPredator extends Predator { + + /* constants relative to the Pac-Man game */ + public static final int SCATTER_DURATION = 14; + public static final int CHASE_DURATION = 40; + + /** + * Constructs a predator with a specified position. + * + * @param position Position of the predator in the labyrinth + */ + public GhostPredator(Vector2D position) { + super(position); + } + +} -- cgit v1.2.3