public static void run() {
    while (running) {
      try {
        Thread.sleep(50);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      // repaint calls update
      pane.repaint();

      if(Ecosystem.getBlue().size() + Ecosystem.getRed().size() +Ecosystem.getYellow().size() +Ecosystem.getOrange().size() == 0) {
          init();
      }
    }
  }