Large diffs are not rendered by default.

@@ -217,3 +217,9 @@ java.net.UnknownHostException: services.gradle.org
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) [org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar:na]
at org.eclipse.equinox.launcher.Main.run(Main.java:1515) [org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar:na]
at org.eclipse.equinox.launcher.Main.main(Main.java:1488) [org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar:na]
2015-10-29 19:31:10,730 [main] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache file is out-of-date. Remote download required.
2015-10-29 19:41:09,651 [main] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache file is not out-of-date. No remote download required.
2015-10-29 19:48:58,573 [main] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache file is not out-of-date. No remote download required.
2015-10-29 22:17:21,812 [main] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache file is not out-of-date. No remote download required.
2015-10-29 22:47:00,151 [main] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache file is not out-of-date. No remote download required.
2015-10-29 22:58:02,322 [main] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache file is not out-of-date. No remote download required.
@@ -1,3 +1,3 @@
#Thu Oct 29 18:45:54 EDT 2015
#Thu Oct 29 22:57:39 EDT 2015
org.eclipse.core.runtime=2
org.eclipse.platform=4.5.1.v20150904-0015
@@ -1 +1 @@
[[{"location":"/home/insidious/MEGA/Studies/Freshman/Winter Semester/Computer Science/JavaProjects/GreedyAlgorithm","type":"PROJECT","hints":{"PROJECT_NAME":"GreedyAlgorithm"}},"ABSENT"]]
[[{"location":"/home/insidious/MEGA/Studies/Freshman/Winter Semester/Computer Science/JavaProjects/GreedyAlgorithm","type":"PROJECT","hints":{"PROJECT_NAME":"GreedyAlgorithm"}},"ABSENT"],[{"location":"/usr/lib/jvm/java-8-openjdk","type":"JRE","hints":{}},"jre:jre:8.0.0"]]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
@@ -78,7 +78,7 @@ public String hunt(){
//get the next step
currentStep = path[direction];
//figure out what the next direction will be
direction = direction + currentStep.getDirection();
direction += currentStep.getDirection();


}
@@ -26,13 +26,12 @@ public class StackHunt implements Hunt {
private int start;

public void initialize(String fileName) throws IOException {
// Put the stones in the left stack as you read create them
// Put the stones in the left stack as you read create them
// Sets up a buffer and links the file to the buffer
BufferedReader buffer = new BufferedReader(new FileReader(fileName));
// Reads the first line, which contains a number, translate the string to a number and places it in start
this.start = Integer.valueOf(buffer.readLine()).intValue();
// index keep track of the array position being filled
int index = 0;

// Loop until the buffer runs out of records
while (buffer.ready()){
// Place the buffer contents into a string tokenizer using the tab token
@@ -42,8 +41,7 @@ public void initialize(String fileName) throws IOException {
// Place the stone in the array
this.left.push(stone);

// increment the index, so we know how many stepping stones there are
index++;

}
// put all items from left stack into right stack, so we can start from the first item
// "Slinky" the stones from the left stack to the right stack.
@@ -72,13 +70,24 @@ public String toString(){
public String hunt(){
String answer = "";
int move = this.start;
while(move!=0){

int dir = this.start;
while(move != 0){


if(dir < 0){
for(int i = 0; i > dir; i--){
right.push(left.pop());
}
} else {
for(int i = 0; i < dir; i++){
left.push(right.pop());
}
}





answer += right.peek().getSymbol();
move = right.peek().getDirection();
dir = right.peek().getDirection();
}
return answer;
}