diff options
Diffstat (limited to 'src/ch/epfl/maze/physical/Animal.java')
-rw-r--r-- | src/ch/epfl/maze/physical/Animal.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ch/epfl/maze/physical/Animal.java b/src/ch/epfl/maze/physical/Animal.java index 9123d82..0079d11 100644 --- a/src/ch/epfl/maze/physical/Animal.java +++ b/src/ch/epfl/maze/physical/Animal.java | |||
@@ -9,7 +9,6 @@ import ch.epfl.maze.util.Vector2D; | |||
9 | * | 9 | * |
10 | * @author Pacien TRAN-GIRARD | 10 | * @author Pacien TRAN-GIRARD |
11 | */ | 11 | */ |
12 | |||
13 | abstract public class Animal { | 12 | abstract public class Animal { |
14 | 13 | ||
15 | private Vector2D position; | 14 | private Vector2D position; |
@@ -19,7 +18,6 @@ abstract public class Animal { | |||
19 | * | 18 | * |
20 | * @param position Position of the animal in the labyrinth | 19 | * @param position Position of the animal in the labyrinth |
21 | */ | 20 | */ |
22 | |||
23 | public Animal(Vector2D position) { | 21 | public Animal(Vector2D position) { |
24 | this.position = position; | 22 | this.position = position; |
25 | } | 23 | } |
@@ -33,7 +31,6 @@ abstract public class Animal { | |||
33 | * World.getChoices(Vector2D)}) | 31 | * World.getChoices(Vector2D)}) |
34 | * @return The next direction of the animal, chosen in {@code choices} | 32 | * @return The next direction of the animal, chosen in {@code choices} |
35 | */ | 33 | */ |
36 | |||
37 | abstract public Direction move(Direction[] choices); | 34 | abstract public Direction move(Direction[] choices); |
38 | 35 | ||
39 | /** | 36 | /** |
@@ -44,7 +41,6 @@ abstract public class Animal { | |||
44 | * | 41 | * |
45 | * @param dir Direction that the animal has taken | 42 | * @param dir Direction that the animal has taken |
46 | */ | 43 | */ |
47 | |||
48 | public final void update(Direction dir) { | 44 | public final void update(Direction dir) { |
49 | this.position = this.position.addDirectionTo(dir); | 45 | this.position = this.position.addDirectionTo(dir); |
50 | } | 46 | } |
@@ -57,7 +53,6 @@ abstract public class Animal { | |||
57 | * | 53 | * |
58 | * @param position | 54 | * @param position |
59 | */ | 55 | */ |
60 | |||
61 | public final void setPosition(Vector2D position) { | 56 | public final void setPosition(Vector2D position) { |
62 | this.position = position; | 57 | this.position = position; |
63 | } | 58 | } |
@@ -67,10 +62,10 @@ abstract public class Animal { | |||
67 | * | 62 | * |
68 | * @return Current position of animal. | 63 | * @return Current position of animal. |
69 | */ | 64 | */ |
70 | |||
71 | public final Vector2D getPosition() { | 65 | public final Vector2D getPosition() { |
72 | return this.position; | 66 | return this.position; |
73 | } | 67 | } |
74 | 68 | ||
75 | abstract public Animal copy(); | 69 | abstract public Animal copy(); |
70 | |||
76 | } | 71 | } |