Skip to content

Commit

Permalink
Minor changes in GraphGenerator v2
Browse files Browse the repository at this point in the history
  • Loading branch information
eliztekcan committed Mar 9, 2017
1 parent 01f0eb3 commit 8e3a331
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/uni/bilkent/hai/GraphGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,31 @@ public GraphGenerator()

if(curState.getStart().getNumberOfBoys() != 0)
{
nodes += curState.getStart().getNumberOfBoys() + " Boy";
nodes += curState.getStart().getNumberOfBoys() + " Boy ";
}

if(curState.getStart().getNumberOfSoldiers() != 0)
{
nodes += "," + curState.getStart().getNumberOfSoldiers() + " Soldier";
nodes += curState.getStart().getNumberOfSoldiers() + " Soldier";
}

if( curState.getBoat().getRiverSide() ==RiverSide.START){
nodes += ", Boat";
nodes += " Boat";
}
nodes += ") (";

if(curState.getGoal().getNumberOfBoys() != 0)
{
nodes += curState.getGoal().getNumberOfBoys() + " Boy";
nodes += curState.getGoal().getNumberOfBoys() + " Boy ";
}

if(curState.getGoal().getNumberOfSoldiers() != 0)
{
nodes += "," + curState.getGoal().getNumberOfSoldiers() + " Soldier";
nodes += curState.getGoal().getNumberOfSoldiers() + " Soldier";
}

if( curState.getBoat().getRiverSide() ==RiverSide.GOAL){
nodes += ", Boat";
nodes += " Boat";
}

nodes += "))\" } }";
Expand All @@ -62,10 +62,10 @@ public GraphGenerator()
edges += "\"data\": { \"source\": \"" + curState.getid() + "\",\"target\": "
+ neighborstates.get(j).getid() + "\" } },";
}
edges = edges.substring(0, edges.length()-1);

}
nodes += "]";
edges = edges.substring(0, edges.length()-1);
edges += "]";
}
public static void main(String[] args) {
Expand Down

0 comments on commit 8e3a331

Please sign in to comment.