Skip to content
This repository has been archived by the owner on Dec 29, 2018. It is now read-only.

Commit

Permalink
Ready for tomorrow.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchallen committed Sep 12, 2017
1 parent c08bdcf commit 84c8622
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 3 deletions.
1 change: 0 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {
}

dependencies {
compile 'com.github.cs125-illinois:mazemaker:0.1'
compile 'com.github.cs125-illinois:mazemaker:0.3'
}

checkstyle {
Expand Down
3 changes: 2 additions & 1 deletion config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>

<module name="MagicNumber"/>
<!-- Lab1: We need magic numbers for this one. -->
<!-- <module name="MagicNumber"/> -->
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
Expand Down
46 changes: 46 additions & 0 deletions src/main/java/SolveMaze.java
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 removed src/main/resources/LabeledHeart.png
Binary file not shown.
Binary file removed src/main/resources/sprite1.gif
Binary file not shown.

0 comments on commit 84c8622

Please sign in to comment.