Example #1
0
 /** Changes the Tree's habitat */
 public void execute() throws InvalidOperation {
   String key;
   Tree t;
   Decidous d;
   try {
     key = IO.readString(treeKeyReq());
     t = _entity.getTree(key);
     if (t.getType().compareTo(caduca()) == 0) {
       d = (Decidous) t;
       while (((key = IO.readString(treeNewBiological())).compareTo(withLeaves()) != 0)
           && (key.compareTo(withoutLeaves()) != 0)
           && (key.compareTo(fallingLeaves()) != 0)
           && (key.compareTo(growingLeaves()) != 0)) ;
       d.setBiologicalCycle(key);
       _entity.setChanged(true);
     }
     return;
   } catch (IOException e) {
     IO.println(e.toString());
     return;
   }
 }