Example #1
0
 protected void createTempActivleList(
     List<ParseTreeNode<CommandInterface>> turtles, List<Integer> newActiveList) {
   try {
     for (int i = 1; i < turtles.size() - 1; i++) {
       newActiveList.add((int) turtles.get(i).getCommandValue());
     }
   } catch (Exception e) {
     turtleData.setErrorMessage(
         this.getClass().getSimpleName() + ": " + errorResources.getString("noArgument"));
   }
 }
Example #2
0
 protected void resetActiveList() {
   for (int i = 0; i < originalActiveList.size(); i++) {
     turtleData.addToActiveList(originalActiveList.get(i));
   }
 }
Example #3
0
 protected void backUpActive() {
   for (int i = 0; i < turtleData.activeTurtleListSize(); i++) {
     originalActiveList.add(turtleData.activeTurtleListValue(i));
   }
 }
Example #4
0
 public MultiCommands(Data turtleData) {
   this.turtleData = turtleData;
   originalID = turtleData.getActiveTurtleID();
   originalActiveList = new ArrayList<Integer>();
   errorResources = ResourceBundle.getBundle(ERROR_RESOURCES);
 }