From bc477506342411e9156b3230d847cb92bcb8e5f9 Mon Sep 17 00:00:00 2001
From: Pacien TRAN-GIRARD
Date: Tue, 24 Nov 2015 11:11:17 +0100
Subject: Reformat code
---
src/ch/epfl/maze/util/Direction.java | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
(limited to 'src/ch/epfl/maze/util/Direction.java')
diff --git a/src/ch/epfl/maze/util/Direction.java b/src/ch/epfl/maze/util/Direction.java
index 5f83c22..d2ee4e7 100644
--- a/src/ch/epfl/maze/util/Direction.java
+++ b/src/ch/epfl/maze/util/Direction.java
@@ -7,14 +7,12 @@ package ch.epfl.maze.util;
*
* @author Pacien TRAN-GIRARD
*/
-
public enum Direction {
DOWN, UP, RIGHT, LEFT, NONE;
/**
* An array of all the possible directions that can be taken.
*/
-
public static final Direction[] POSSIBLE_DIRECTIONS = new Direction[]{
Direction.DOWN,
Direction.UP,
@@ -27,7 +25,6 @@ public enum Direction {
*
* @return Integer value of the direction
*/
-
public int intValue() {
switch (this) {
case DOWN:
@@ -53,7 +50,6 @@ public enum Direction {
*
* @return Orthonormal {@code Vector2D} that represents the direction.
*/
-
public Vector2D toVector() {
switch (this) {
case DOWN:
@@ -79,7 +75,6 @@ public enum Direction {
*
* @return The opposite direction.
*/
-
public Direction reverse() {
switch (this) {
case DOWN:
@@ -107,7 +102,6 @@ public enum Direction {
* @return true if the direction is the opposite the argument,
* false otherwise
*/
-
public boolean isOpposite(Direction d) {
return this == d.reverse();
}
@@ -120,7 +114,6 @@ public enum Direction {
* @return The direction converted to the frame of reference given by the
* direction called.
*/
-
public Direction relativeDirection(Direction dir) {
switch (this) {
case DOWN:
@@ -148,7 +141,6 @@ public enum Direction {
* @return The direction converted back to the frame of reference of the
* labyrinth
*/
-
public Direction unRelativeDirection(Direction dir) {
switch (this) {
case DOWN:
@@ -174,7 +166,6 @@ public enum Direction {
*
* @return The rotated direction to the right
*/
-
public Direction rotateRight() {
switch (this) {
case DOWN:
@@ -200,7 +191,6 @@ public enum Direction {
*
* @return The rotated direction to the left
*/
-
public Direction rotateLeft() {
switch (this) {
case DOWN:
@@ -230,7 +220,6 @@ public enum Direction {
* @return The directions converted to the frame of reference given by the
* direction which calls the method
*/
-
public Direction[] relativeDirections(Direction[] dir) {
Direction[] relativeDirections = new Direction[dir.length];
@@ -240,4 +229,5 @@ public enum Direction {
return relativeDirections;
}
+
}
--
cgit v1.2.3