This repository has been archived by the owner on Dec 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 724
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import edu.illinois.cs.cs125.lib.mazemaker.Maze; | ||
|
||
/** | ||
* Solve a randomly-generated maze. | ||
* | ||
* @see <a href="https://github.com/cs125-illinois/mazemaker">Mazemaker on GitHub</a> | ||
* @see <a href="https://cs125-illinois.github.io/mazemaker/">Mazemaker Documentation</a> | ||
* @see <a href="https://cs125.cs.illinois.edu/lab/2/#maze">Lab 2 Writeup</a> | ||
*/ | ||
@SuppressWarnings("checkstyle:emptyblock") | ||
public class SolveMaze { | ||
|
||
/** | ||
* Implement your maze solving algorithm here. | ||
* | ||
* @param unused unused input arguments | ||
*/ | ||
|
||
public static void main(final String[] unused) { | ||
/* | ||
* Create a new 10 x 10 maze. Feel free to change these values. | ||
*/ | ||
Maze maze = new Maze(10, 10); | ||
|
||
/* | ||
* Pick (0, 0), the bottom left corner, as the starting point. | ||
* Put the end in the top right corner. | ||
*/ | ||
maze.startAtZero(); | ||
maze.endAtTopRight(); | ||
|
||
/* | ||
* You should be able to solve a 10 x 10 maze in (far fewer than) 1000 steps. | ||
* Feel free to adjust this number if you experiment with other mazes. | ||
*/ | ||
for (int step = 0; step < 1000; step++) { | ||
// Implement your maze solving algorithm here | ||
} | ||
|
||
if (maze.isFinished()) { | ||
System.out.println("You solved the maze!"); | ||
} else { | ||
System.out.println("Try again!"); | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.