diff options
author | Pacien TRAN-GIRARD | 2015-11-21 15:37:55 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2015-11-21 15:51:40 +0100 |
commit | 211d6a6042d139ab5f3c770aa5ac695a062232c8 (patch) | |
tree | 9e0640772bfb03a0d197e3c2705103dc9eaf927e /src/ch/epfl/maze/util | |
parent | b74196f1c287671a0272ab5d2c3cfe5fd25ecd95 (diff) | |
download | maze-solver-211d6a6042d139ab5f3c770aa5ac695a062232c8.tar.gz |
Implement World non-abstract behaviours
Diffstat (limited to 'src/ch/epfl/maze/util')
-rw-r--r-- | src/ch/epfl/maze/util/Direction.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ch/epfl/maze/util/Direction.java b/src/ch/epfl/maze/util/Direction.java index e8c0993..5f83c22 100644 --- a/src/ch/epfl/maze/util/Direction.java +++ b/src/ch/epfl/maze/util/Direction.java | |||
@@ -4,12 +4,25 @@ package ch.epfl.maze.util; | |||
4 | * Directions that an animal can take to move. They represent the four cardinal | 4 | * Directions that an animal can take to move. They represent the four cardinal |
5 | * points ({@code DOWN, UP, RIGHT, LEFT}) from the frame of reference of the | 5 | * points ({@code DOWN, UP, RIGHT, LEFT}) from the frame of reference of the |
6 | * labyrinth, plus a default one : {@code NONE}. | 6 | * labyrinth, plus a default one : {@code NONE}. |
7 | * | ||
8 | * @author Pacien TRAN-GIRARD | ||
7 | */ | 9 | */ |
8 | 10 | ||
9 | public enum Direction { | 11 | public enum Direction { |
10 | DOWN, UP, RIGHT, LEFT, NONE; | 12 | DOWN, UP, RIGHT, LEFT, NONE; |
11 | 13 | ||
12 | /** | 14 | /** |
15 | * An array of all the possible directions that can be taken. | ||
16 | */ | ||
17 | |||
18 | public static final Direction[] POSSIBLE_DIRECTIONS = new Direction[]{ | ||
19 | Direction.DOWN, | ||
20 | Direction.UP, | ||
21 | Direction.RIGHT, | ||
22 | Direction.LEFT | ||
23 | }; | ||
24 | |||
25 | /** | ||
13 | * Returns the integer value of the direction | 26 | * Returns the integer value of the direction |
14 | * | 27 | * |
15 | * @return Integer value of the direction | 28 | * @return Integer value of the direction |