From 5f9be99e7ebd4a90e666e6efbe9e9d4b3b8008e7 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Tue, 24 Nov 2015 12:56:50 +0100 Subject: Move directional attribute to Animal --- src/ch/epfl/maze/physical/zoo/Panda.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ch/epfl/maze/physical/zoo/Panda.java') diff --git a/src/ch/epfl/maze/physical/zoo/Panda.java b/src/ch/epfl/maze/physical/zoo/Panda.java index b794d10..ce38fda 100644 --- a/src/ch/epfl/maze/physical/zoo/Panda.java +++ b/src/ch/epfl/maze/physical/zoo/Panda.java @@ -88,7 +88,7 @@ public class Panda extends ProbabilisticAnimal { private Direction[] selectBestDirections(Direction[] choices) { // special case if (this.isIntersection(choices) && this.allChoicesLeadingTo(choices, Trail.Marking.AVOID_MARKING)) - return new Direction[]{this.getCurrentDirection().reverse()}; + return new Direction[]{this.getDirection().reverse()}; // general case for (Trail.Marking mark : Trail.Marking.ALL) { -- cgit v1.2.3