Exemplo n.º 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"));
   }
 }
Exemplo n.º 2
0
 protected void resetActiveList() {
   for (int i = 0; i < originalActiveList.size(); i++) {
     turtleData.addToActiveList(originalActiveList.get(i));
   }
 }
Exemplo n.º 3
0
 protected void backUpActive() {
   for (int i = 0; i < turtleData.activeTurtleListSize(); i++) {
     originalActiveList.add(turtleData.activeTurtleListValue(i));
   }
 }
Exemplo n.º 4
0
 public MultiCommands(Data turtleData) {
   this.turtleData = turtleData;
   originalID = turtleData.getActiveTurtleID();
   originalActiveList = new ArrayList<Integer>();
   errorResources = ResourceBundle.getBundle(ERROR_RESOURCES);
 }