summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/physical/pacman/Blinky.java
blob: 5f81d135bd006d92ce3b2698db6e9b409a127079 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package ch.epfl.maze.physical.pacman;

import ch.epfl.maze.physical.Animal;
import ch.epfl.maze.physical.Daedalus;
import ch.epfl.maze.util.Vector2D;

/**
 * Red ghost from the Pac-Man game, chases directly its target.
 *
 * @author EPFL
 * @author Pacien TRAN-GIRARD
 */
public class Blinky extends Ghost {

    /**
     * Constructs a Blinky with a starting position.
     *
     * @param position Starting position of Blinky in the labyrinth
     */
    public Blinky(Vector2D position) {
        super(position);
    }

    /**
     * Targets directly the current position of the Prey.
     *
     * @param daedalus The Daedalus
     * @return The position of the Prey
     */
    @Override
    protected Vector2D getPreyTargetPosition(Daedalus daedalus) {
        return this.getPreyPosition(daedalus);
    }

    @Override
    public Animal copy() {
        return new Blinky(this.getPosition());
    }

}