summaryrefslogtreecommitdiff
path: root/src/ch/epfl/maze/util/LabyrinthGenerator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch/epfl/maze/util/LabyrinthGenerator.java')
-rw-r--r--src/ch/epfl/maze/util/LabyrinthGenerator.java21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/ch/epfl/maze/util/LabyrinthGenerator.java b/src/ch/epfl/maze/util/LabyrinthGenerator.java
index 3e83ec5..9e47c25 100644
--- a/src/ch/epfl/maze/util/LabyrinthGenerator.java
+++ b/src/ch/epfl/maze/util/LabyrinthGenerator.java
@@ -10,7 +10,6 @@ import java.util.regex.Pattern;
10/** 10/**
11 * Generates a set of pre-computed labyrinth structures 11 * Generates a set of pre-computed labyrinth structures
12 */ 12 */
13
14public final class LabyrinthGenerator { 13public final class LabyrinthGenerator {
15 14
16 /** 15 /**
@@ -18,7 +17,6 @@ public final class LabyrinthGenerator {
18 * 17 *
19 * @return A small labyrinth 18 * @return A small labyrinth
20 */ 19 */
21
22 public static int[][] getSmall() { 20 public static int[][] getSmall() {
23 int[][] labyrinth = { 21 int[][] labyrinth = {
24 {1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1}, 22 {1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1},
@@ -42,7 +40,6 @@ public final class LabyrinthGenerator {
42 * 40 *
43 * @return A medium labyrinth 41 * @return A medium labyrinth
44 */ 42 */
45
46 public static int[][] getMedium() { 43 public static int[][] getMedium() {
47 int[][] labyrinth = { 44 int[][] labyrinth = {
48 {1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 45 {1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -106,7 +103,6 @@ public final class LabyrinthGenerator {
106 * 103 *
107 * @return The Pac-Man level 104 * @return The Pac-Man level
108 */ 105 */
109
110 public static int[][] getPacMan() { 106 public static int[][] getPacMan() {
111 int[][] labyrinth = { 107 int[][] labyrinth = {
112 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 108 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -142,7 +138,6 @@ public final class LabyrinthGenerator {
142 * 138 *
143 * @return One of the Ms. Pac-Man levels 139 * @return One of the Ms. Pac-Man levels
144 */ 140 */
145
146 public static int[][] getMsPacMan() { 141 public static int[][] getMsPacMan() {
147 int[][] labyrinth = { 142 int[][] labyrinth = {
148 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 143 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -179,7 +174,6 @@ public final class LabyrinthGenerator {
179 * 174 *
180 * @return A labyrinth multiply connected 175 * @return A labyrinth multiply connected
181 */ 176 */
182
183 public static int[][] getMultiplyConnected() { 177 public static int[][] getMultiplyConnected() {
184 int[][] labyrinth = { 178 int[][] labyrinth = {
185 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,}, 179 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,},
@@ -205,7 +199,6 @@ public final class LabyrinthGenerator {
205 * 199 *
206 * @return A maze for debugging the Mouse 200 * @return A maze for debugging the Mouse
207 */ 201 */
208
209 public static int[][] getDebugMouse() { 202 public static int[][] getDebugMouse() {
210 int[][] labyrinth = { 203 int[][] labyrinth = {
211 {1, 1, 1, 1, 1, 1, 1}, 204 {1, 1, 1, 1, 1, 1, 1},
@@ -225,7 +218,6 @@ public final class LabyrinthGenerator {
225 * 218 *
226 * @return A maze for debugging the Hamster 219 * @return A maze for debugging the Hamster
227 */ 220 */
228
229 public static int[][] getDebugHamster() { 221 public static int[][] getDebugHamster() {
230 int[][] labyrinth = { 222 int[][] labyrinth = {
231 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 223 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -245,7 +237,6 @@ public final class LabyrinthGenerator {
245 * 237 *
246 * @return A maze for debugging the Monkey 238 * @return A maze for debugging the Monkey
247 */ 239 */
248
249 public static int[][] getDebugMonkey() { 240 public static int[][] getDebugMonkey() {
250 int[][] labyrinth = { 241 int[][] labyrinth = {
251 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 242 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -266,7 +257,6 @@ public final class LabyrinthGenerator {
266 * 257 *
267 * @return A maze for debugging the Bear 258 * @return A maze for debugging the Bear
268 */ 259 */
269
270 public static int[][] getDebugBear1() { 260 public static int[][] getDebugBear1() {
271 int[][] labyrinth = { 261 int[][] labyrinth = {
272 {1, 1, 1, 2, 1, 1, 1,}, 262 {1, 1, 1, 2, 1, 1, 1,},
@@ -286,7 +276,6 @@ public final class LabyrinthGenerator {
286 * 276 *
287 * @return A maze for debugging the Bear 277 * @return A maze for debugging the Bear
288 */ 278 */
289
290 public static int[][] getDebugBear2() { 279 public static int[][] getDebugBear2() {
291 int[][] labyrinth = { 280 int[][] labyrinth = {
292 {1, 2, 1, 1}, 281 {1, 2, 1, 1},
@@ -305,7 +294,6 @@ public final class LabyrinthGenerator {
305 * 294 *
306 * @return A maze for debugging the Panda 295 * @return A maze for debugging the Panda
307 */ 296 */
308
309 public static int[][] getDebugPanda1() { 297 public static int[][] getDebugPanda1() {
310 int[][] labyrinth = { 298 int[][] labyrinth = {
311 {1, 1, 1, 2, 1, 1, 1}, 299 {1, 1, 1, 2, 1, 1, 1},
@@ -324,7 +312,6 @@ public final class LabyrinthGenerator {
324 * 312 *
325 * @return A maze for debugging the Panda 313 * @return A maze for debugging the Panda
326 */ 314 */
327
328 public static int[][] getDebugPanda2() { 315 public static int[][] getDebugPanda2() {
329 int[][] labyrinth = { 316 int[][] labyrinth = {
330 {1, 1, 1, 1, 1, 1, 1, 1, 1}, 317 {1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -349,7 +336,6 @@ public final class LabyrinthGenerator {
349 * 336 *
350 * @return A maze to run with a Bear and a Monkey 337 * @return A maze to run with a Bear and a Monkey
351 */ 338 */
352
353 public static int[][] getBearVsMonkey() { 339 public static int[][] getBearVsMonkey() {
354 int[][] labyrinth = { 340 int[][] labyrinth = {
355 {1, 1, 1, 3, 1, 1, 1}, 341 {1, 1, 1, 3, 1, 1, 1},
@@ -368,7 +354,6 @@ public final class LabyrinthGenerator {
368 * 354 *
369 * @return A maze to run with a Panda and a Hamster 355 * @return A maze to run with a Panda and a Hamster
370 */ 356 */
371
372 public static int[][] getPandaVsHamster() { 357 public static int[][] getPandaVsHamster() {
373 int[][] labyrinth = { 358 int[][] labyrinth = {
374 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 359 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -394,7 +379,6 @@ public final class LabyrinthGenerator {
394 * 379 *
395 * @return A maze for debugging Blinky 380 * @return A maze for debugging Blinky
396 */ 381 */
397
398 public static int[][] getDebugBlinky() { 382 public static int[][] getDebugBlinky() {
399 int[][] labyrinth = { 383 int[][] labyrinth = {
400 {1, 1, 1, 1, 1, 1, 1, 1}, 384 {1, 1, 1, 1, 1, 1, 1, 1},
@@ -414,7 +398,6 @@ public final class LabyrinthGenerator {
414 * 398 *
415 * @return A maze for debugging Pinky 399 * @return A maze for debugging Pinky
416 */ 400 */
417
418 public static int[][] getDebugPinky() { 401 public static int[][] getDebugPinky() {
419 int[][] labyrinth = { 402 int[][] labyrinth = {
420 {1, 1, 1, 1, 1, 1, 1, 1, 1}, 403 {1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -432,7 +415,6 @@ public final class LabyrinthGenerator {
432 * 415 *
433 * @return A maze for debugging Inky 416 * @return A maze for debugging Inky
434 */ 417 */
435
436 public static int[][] getDebugInky() { 418 public static int[][] getDebugInky() {
437 int[][] labyrinth = { 419 int[][] labyrinth = {
438 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 420 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
@@ -456,7 +438,6 @@ public final class LabyrinthGenerator {
456 * 438 *
457 * @return A maze for debugging Clyde 439 * @return A maze for debugging Clyde
458 */ 440 */
459
460 public static int[][] getDebugClyde() { 441 public static int[][] getDebugClyde() {
461 int[][] labyrinth = { 442 int[][] labyrinth = {
462 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1,}, 443 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1,},
@@ -479,7 +460,6 @@ public final class LabyrinthGenerator {
479 * @param filename The file location 460 * @param filename The file location
480 * @return Labyrinth structure parsed from a file 461 * @return Labyrinth structure parsed from a file
481 */ 462 */
482
483 public static int[][] readFromFile(String filename) { 463 public static int[][] readFromFile(String filename) {
484 File file = new File(filename); 464 File file = new File(filename);
485 int[][] labyrinth = null; 465 int[][] labyrinth = null;
@@ -528,4 +508,5 @@ public final class LabyrinthGenerator {
528 508
529 return labyrinth; 509 return labyrinth;
530 } 510 }
511
531} 512}