From d9f6761221c25c19e96b2f173d4db0a27b6c8e9d Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 23 Nov 2015 10:34:41 +0100 Subject: Properly define class constants and protect object attributes --- src/ch/epfl/maze/physical/zoo/Panda.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ch/epfl/maze/physical/zoo') diff --git a/src/ch/epfl/maze/physical/zoo/Panda.java b/src/ch/epfl/maze/physical/zoo/Panda.java index fecec84..dc1198e 100644 --- a/src/ch/epfl/maze/physical/zoo/Panda.java +++ b/src/ch/epfl/maze/physical/zoo/Panda.java @@ -87,7 +87,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.currentDirection.reverse()}; + return new Direction[]{this.getCurrentDirection().reverse()}; // general case for (Trail.Marking mark : Trail.Marking.ALL) { -- cgit v1.2.3