diff options
Diffstat (limited to 'src/ch/epfl/maze/physical/Daedalus.java')
-rw-r--r-- | src/ch/epfl/maze/physical/Daedalus.java | 238 |
1 files changed, 115 insertions, 123 deletions
diff --git a/src/ch/epfl/maze/physical/Daedalus.java b/src/ch/epfl/maze/physical/Daedalus.java index 329ab92..2edad7b 100644 --- a/src/ch/epfl/maze/physical/Daedalus.java +++ b/src/ch/epfl/maze/physical/Daedalus.java | |||
@@ -6,131 +6,123 @@ import java.util.List; | |||
6 | /** | 6 | /** |
7 | * Daedalus in which predators hunt preys. Once a prey has been caught by a | 7 | * Daedalus in which predators hunt preys. Once a prey has been caught by a |
8 | * predator, it will be removed from the daedalus. | 8 | * predator, it will be removed from the daedalus. |
9 | * | ||
10 | */ | 9 | */ |
11 | 10 | ||
12 | public final class Daedalus extends World { | 11 | public final class Daedalus extends World { |
13 | 12 | ||
14 | /** | 13 | /** |
15 | * Constructs a Daedalus with a labyrinth structure | 14 | * Constructs a Daedalus with a labyrinth structure |
16 | * | 15 | * |
17 | * @param labyrinth | 16 | * @param labyrinth Structure of the labyrinth, an NxM array of tiles |
18 | * Structure of the labyrinth, an NxM array of tiles | 17 | */ |
19 | */ | 18 | |
20 | 19 | public Daedalus(int[][] labyrinth) { | |
21 | public Daedalus(int[][] labyrinth) { | 20 | super(labyrinth); |
22 | super(labyrinth); | 21 | // TODO |
23 | // TODO | 22 | } |
24 | } | 23 | |
25 | 24 | @Override | |
26 | @Override | 25 | public boolean isSolved() { |
27 | public boolean isSolved() { | 26 | // TODO |
28 | // TODO | 27 | return false; |
29 | return false; | 28 | } |
30 | } | 29 | |
31 | 30 | /** | |
32 | /** | 31 | * Adds a predator to the daedalus. |
33 | * Adds a predator to the daedalus. | 32 | * |
34 | * | 33 | * @param p The predator to add |
35 | * @param p | 34 | */ |
36 | * The predator to add | 35 | |
37 | */ | 36 | public void addPredator(Predator p) { |
38 | 37 | // TODO | |
39 | public void addPredator(Predator p) { | 38 | } |
40 | // TODO | 39 | |
41 | } | 40 | /** |
42 | 41 | * Adds a prey to the daedalus. | |
43 | /** | 42 | * |
44 | * Adds a prey to the daedalus. | 43 | * @param p The prey to add |
45 | * | 44 | */ |
46 | * @param p | 45 | |
47 | * The prey to add | 46 | public void addPrey(Prey p) { |
48 | */ | 47 | // TODO |
49 | 48 | } | |
50 | public void addPrey(Prey p) { | 49 | |
51 | // TODO | 50 | /** |
52 | } | 51 | * Removes a predator from the daedalus. |
53 | 52 | * | |
54 | /** | 53 | * @param p The predator to remove |
55 | * Removes a predator from the daedalus. | 54 | */ |
56 | * | 55 | |
57 | * @param p | 56 | public void removePredator(Predator p) { |
58 | * The predator to remove | 57 | // TODO |
59 | */ | 58 | } |
60 | 59 | ||
61 | public void removePredator(Predator p) { | 60 | /** |
62 | // TODO | 61 | * Removes a prey from the daedalus. |
63 | } | 62 | * |
64 | 63 | * @param p The prey to remove | |
65 | /** | 64 | */ |
66 | * Removes a prey from the daedalus. | 65 | |
67 | * | 66 | public void removePrey(Prey p) { |
68 | * @param p | 67 | // TODO |
69 | * The prey to remove | 68 | } |
70 | */ | 69 | |
71 | 70 | @Override | |
72 | public void removePrey(Prey p) { | 71 | public List<Animal> getAnimals() { |
73 | // TODO | 72 | // TODO |
74 | } | 73 | return null; |
75 | 74 | } | |
76 | @Override | 75 | |
77 | public List<Animal> getAnimals() { | 76 | /** |
78 | // TODO | 77 | * Returns a copy of the list of all current predators in the daedalus. |
79 | return null; | 78 | * |
80 | } | 79 | * @return A list of all predators in the daedalus |
81 | 80 | */ | |
82 | /** | 81 | |
83 | * Returns a copy of the list of all current predators in the daedalus. | 82 | public List<Predator> getPredators() { |
84 | * | 83 | // TODO |
85 | * @return A list of all predators in the daedalus | 84 | return new ArrayList<Predator>(); |
86 | */ | 85 | } |
87 | 86 | ||
88 | public List<Predator> getPredators() { | 87 | /** |
89 | // TODO | 88 | * Returns a copy of the list of all current preys in the daedalus. |
90 | return new ArrayList<Predator>(); | 89 | * |
91 | } | 90 | * @return A list of all preys in the daedalus |
92 | 91 | */ | |
93 | /** | 92 | |
94 | * Returns a copy of the list of all current preys in the daedalus. | 93 | public List<Prey> getPreys() { |
95 | * | 94 | // TODO |
96 | * @return A list of all preys in the daedalus | 95 | return new ArrayList<Prey>(); |
97 | */ | 96 | } |
98 | 97 | ||
99 | public List<Prey> getPreys() { | 98 | /** |
100 | // TODO | 99 | * Determines if the daedalus contains a predator. |
101 | return new ArrayList<Prey>(); | 100 | * |
102 | } | 101 | * @param p The predator in question |
103 | 102 | * @return <b>true</b> if the predator belongs to the world, <b>false</b> | |
104 | /** | 103 | * otherwise. |
105 | * Determines if the daedalus contains a predator. | 104 | */ |
106 | * | 105 | |
107 | * @param p | 106 | public boolean hasPredator(Predator p) { |
108 | * The predator in question | 107 | // TODO |
109 | * @return <b>true</b> if the predator belongs to the world, <b>false</b> | 108 | return false; |
110 | * otherwise. | 109 | } |
111 | */ | 110 | |
112 | 111 | /** | |
113 | public boolean hasPredator(Predator p) { | 112 | * Determines if the daedalus contains a prey. |
114 | // TODO | 113 | * |
115 | return false; | 114 | * @param p The prey in question |
116 | } | 115 | * @return <b>true</b> if the prey belongs to the world, <b>false</b> |
117 | 116 | * otherwise. | |
118 | /** | 117 | */ |
119 | * Determines if the daedalus contains a prey. | 118 | |
120 | * | 119 | public boolean hasPrey(Prey p) { |
121 | * @param p | 120 | // TODO |
122 | * The prey in question | 121 | return false; |
123 | * @return <b>true</b> if the prey belongs to the world, <b>false</b> | 122 | } |
124 | * otherwise. | 123 | |
125 | */ | 124 | @Override |
126 | 125 | public void reset() { | |
127 | public boolean hasPrey(Prey p) { | 126 | // TODO |
128 | // TODO | 127 | } |
129 | return false; | ||
130 | } | ||
131 | |||
132 | @Override | ||
133 | public void reset() { | ||
134 | // TODO | ||
135 | } | ||
136 | } | 128 | } |