From 7009ff652c18a4e387dca4972e570bf1f56387c3 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 22 Nov 2015 18:49:47 +0100 Subject: Implement ghosts polymorphic copy methods --- src/ch/epfl/maze/physical/pacman/Blinky.java | 3 +-- src/ch/epfl/maze/physical/pacman/Clyde.java | 3 +-- src/ch/epfl/maze/physical/pacman/Inky.java | 3 +-- src/ch/epfl/maze/physical/pacman/Pinky.java | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ch/epfl/maze/physical/pacman/Blinky.java b/src/ch/epfl/maze/physical/pacman/Blinky.java index d70f444..02b7159 100644 --- a/src/ch/epfl/maze/physical/pacman/Blinky.java +++ b/src/ch/epfl/maze/physical/pacman/Blinky.java @@ -31,7 +31,6 @@ public class Blinky extends Predator { @Override public Animal copy() { - // TODO - return null; + return new Blinky(this.getPosition()); } } diff --git a/src/ch/epfl/maze/physical/pacman/Clyde.java b/src/ch/epfl/maze/physical/pacman/Clyde.java index 8b3fd20..35d0a9b 100644 --- a/src/ch/epfl/maze/physical/pacman/Clyde.java +++ b/src/ch/epfl/maze/physical/pacman/Clyde.java @@ -32,7 +32,6 @@ public class Clyde extends Predator { @Override public Animal copy() { - // TODO - return null; + return new Clyde(this.getPosition()); } } diff --git a/src/ch/epfl/maze/physical/pacman/Inky.java b/src/ch/epfl/maze/physical/pacman/Inky.java index 883c385..e5cf5ad 100644 --- a/src/ch/epfl/maze/physical/pacman/Inky.java +++ b/src/ch/epfl/maze/physical/pacman/Inky.java @@ -32,7 +32,6 @@ public class Inky extends Predator { @Override public Animal copy() { - // TODO - return null; + return new Inky(this.getPosition()); } } diff --git a/src/ch/epfl/maze/physical/pacman/Pinky.java b/src/ch/epfl/maze/physical/pacman/Pinky.java index aaa2720..100264c 100644 --- a/src/ch/epfl/maze/physical/pacman/Pinky.java +++ b/src/ch/epfl/maze/physical/pacman/Pinky.java @@ -31,7 +31,6 @@ public class Pinky extends Predator { @Override public Animal copy() { - // TODO - return null; + return new Pinky(this.getPosition()); } } -- cgit v1.2.3