summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/physical/pacman
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch/epfl/maze/physical/pacman')
-rw-r--r--src/ch/epfl/maze/physical/pacman/Blinky.java39
-rw-r--r--src/ch/epfl/maze/physical/pacman/Clyde.java40
-rw-r--r--src/ch/epfl/maze/physical/pacman/Inky.java40
-rw-r--r--src/ch/epfl/maze/physical/pacman/PacMan.java32
-rw-r--r--src/ch/epfl/maze/physical/pacman/Pinky.java39
5 files changed, 190 insertions, 0 deletions
diff --git a/src/ch/epfl/maze/physical/pacman/Blinky.java b/src/ch/epfl/maze/physical/pacman/Blinky.java
new file mode 100644
index 0000000..22ef16f
--- /dev/null
+++ b/src/ch/epfl/maze/physical/pacman/Blinky.java
@@ -0,0 +1,39 @@
1package ch.epfl.maze.physical.pacman;
2
3import ch.epfl.maze.physical.Animal;
4import ch.epfl.maze.physical.Daedalus;
5import ch.epfl.maze.physical.Predator;
6import ch.epfl.maze.util.Direction;
7import ch.epfl.maze.util.Vector2D;
8
9/**
10 * Red ghost from the Pac-Man game, chases directly its target.
11 *
12 */
13
14public class Blinky extends Predator {
15
16 /**
17 * Constructs a Blinky with a starting position.
18 *
19 * @param position
20 * Starting position of Blinky in the labyrinth
21 */
22
23 public Blinky(Vector2D position) {
24 super(position);
25 // TODO
26 }
27
28 @Override
29 public Direction move(Direction[] choices, Daedalus daedalus) {
30 // TODO
31 return Direction.NONE;
32 }
33
34 @Override
35 public Animal copy() {
36 // TODO
37 return null;
38 }
39}
diff --git a/src/ch/epfl/maze/physical/pacman/Clyde.java b/src/ch/epfl/maze/physical/pacman/Clyde.java
new file mode 100644
index 0000000..4da35d8
--- /dev/null
+++ b/src/ch/epfl/maze/physical/pacman/Clyde.java
@@ -0,0 +1,40 @@
1package ch.epfl.maze.physical.pacman;
2
3import ch.epfl.maze.physical.Animal;
4import ch.epfl.maze.physical.Daedalus;
5import ch.epfl.maze.physical.Predator;
6import ch.epfl.maze.util.Direction;
7import ch.epfl.maze.util.Vector2D;
8
9/**
10 * Orange ghost from the Pac-Man game, alternates between direct chase if far
11 * from its target and SCATTER if close.
12 *
13 */
14
15public class Clyde extends Predator {
16
17 /**
18 * Constructs a Clyde with a starting position.
19 *
20 * @param position
21 * Starting position of Clyde in the labyrinth
22 */
23
24 public Clyde(Vector2D position) {
25 super(position);
26 // TODO
27 }
28
29 @Override
30 public Direction move(Direction[] choices, Daedalus daedalus) {
31 // TODO
32 return Direction.NONE;
33 }
34
35 @Override
36 public Animal copy() {
37 // TODO
38 return null;
39 }
40}
diff --git a/src/ch/epfl/maze/physical/pacman/Inky.java b/src/ch/epfl/maze/physical/pacman/Inky.java
new file mode 100644
index 0000000..87d9626
--- /dev/null
+++ b/src/ch/epfl/maze/physical/pacman/Inky.java
@@ -0,0 +1,40 @@
1package ch.epfl.maze.physical.pacman;
2
3import ch.epfl.maze.physical.Animal;
4import ch.epfl.maze.physical.Daedalus;
5import ch.epfl.maze.physical.Predator;
6import ch.epfl.maze.util.Direction;
7import ch.epfl.maze.util.Vector2D;
8
9/**
10 * Blue ghost from the Pac-Man game, targets the result of two times the vector
11 * from Blinky to its target.
12 *
13 */
14
15public class Inky extends Predator {
16
17 /**
18 * Constructs a Inky with a starting position.
19 *
20 * @param position
21 * Starting position of Inky in the labyrinth
22 */
23
24 public Inky(Vector2D position) {
25 super(position);
26 // TODO
27 }
28
29 @Override
30 public Direction move(Direction[] choices, Daedalus daedalus) {
31 // TODO
32 return Direction.NONE;
33 }
34
35 @Override
36 public Animal copy() {
37 // TODO
38 return null;
39 }
40}
diff --git a/src/ch/epfl/maze/physical/pacman/PacMan.java b/src/ch/epfl/maze/physical/pacman/PacMan.java
new file mode 100644
index 0000000..0bdd156
--- /dev/null
+++ b/src/ch/epfl/maze/physical/pacman/PacMan.java
@@ -0,0 +1,32 @@
1package ch.epfl.maze.physical.pacman;
2
3import ch.epfl.maze.physical.Animal;
4import ch.epfl.maze.physical.Daedalus;
5import ch.epfl.maze.physical.Prey;
6import ch.epfl.maze.util.Direction;
7import ch.epfl.maze.util.Vector2D;
8
9/**
10 * Pac-Man character, from the famous game of the same name.
11 *
12 */
13
14public class PacMan extends Prey {
15
16 public PacMan(Vector2D position) {
17 super(position);
18 // TODO
19 }
20
21 @Override
22 public Direction move(Direction[] choices, Daedalus daedalus) {
23 // TODO
24 return Direction.NONE;
25 }
26
27 @Override
28 public Animal copy() {
29 // TODO
30 return null;
31 }
32}
diff --git a/src/ch/epfl/maze/physical/pacman/Pinky.java b/src/ch/epfl/maze/physical/pacman/Pinky.java
new file mode 100644
index 0000000..9a64a53
--- /dev/null
+++ b/src/ch/epfl/maze/physical/pacman/Pinky.java
@@ -0,0 +1,39 @@
1package ch.epfl.maze.physical.pacman;
2
3import ch.epfl.maze.physical.Animal;
4import ch.epfl.maze.physical.Daedalus;
5import ch.epfl.maze.physical.Predator;
6import ch.epfl.maze.util.Direction;
7import ch.epfl.maze.util.Vector2D;
8
9/**
10 * Pink ghost from the Pac-Man game, targets 4 squares in front of its target.
11 *
12 */
13
14public class Pinky extends Predator {
15
16 /**
17 * Constructs a Pinky with a starting position.
18 *
19 * @param position
20 * Starting position of Pinky in the labyrinth
21 */
22
23 public Pinky(Vector2D position) {
24 super(position);
25 // TODO
26 }
27
28 @Override
29 public Direction move(Direction[] choices, Daedalus daedalus) {
30 // TODO
31 return Direction.NONE;
32 }
33
34 @Override
35 public Animal copy() {
36 // TODO
37 return null;
38 }
39}