Skip to content

Commit

Permalink
Parse bug in Start class fixed. First draft of Assignment 5 #17
Browse files Browse the repository at this point in the history
  • Loading branch information
janl1992 committed Nov 30, 2018
1 parent 8b676ed commit 85b7e2f
Show file tree
Hide file tree
Showing 5 changed files with 715 additions and 629 deletions.
12 changes: 11 additions & 1 deletion src/main/java/org/team_pjt/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class Start {
private static final String sSchPrefix2 = ":org.team_pjt.agents.SchedulerAgent";
private static final String sCPrefix = ":org.team_pjt.agents.ClientDummy";
private static final String sTPrefix = "timekeeper:org.team_pjt.agents.TimeKeeper";
private static final String sDougManagerPrefix =":org.team_pjt.agents.DoughManager";
private static List<String> agents = new Vector<>();

public static void main(String[] args) {
Expand Down Expand Up @@ -58,7 +59,10 @@ public static void main(String[] args) {
String bakery_idNum = id.split("-")[1];
agents.add(id + sOPPrefix);
agents.add("scheduler-" + bakery_idNum + sSchPrefix2);

agents.add("doughmanager-" + bakery_idNum + sDougManagerPrefix);
// JSONArray jsaDoughPrepTables = bakery.getJSONArray("doughPrepTables");
// Iterator<Object> jsaIterator = jsaDoughPrepTables.iterator();
// while(jsaIterator.hasNext())
}

}
Expand Down Expand Up @@ -108,6 +112,12 @@ public static List<String> buildCMD(List<String> agents, JSONArray jaBakeries, J
sb.append(";");
continue;
}
if(a.contains("doughmanager")){
// bakery = (JSONObject)bakery_iterator.next();
appendAgentAndArguments(sb, bakery.toString().replaceAll(",", "###"), a);
sb.append(";");
continue;
}
}
else {
if(a.contains("Client")){
Expand Down
Loading

0 comments on commit 85b7e2f

Please sign in to comment.