summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/util/Direction.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch/epfl/maze/util/Direction.java')
-rw-r--r--src/ch/epfl/maze/util/Direction.java13
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
9public enum Direction { 11public 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