Ejemplo n.º 1
0
  public void popupActionPopupReleaseFinished() {
    if (actionStatus == ActionStatus.passGlass) {
      for (MyGlass g : glasses) {
        if (g.status == GlassStatus.WaitingForPass) {

          print("popup" + myIndex + "popup released the glass");
          glasses.remove(g);
          animationStatus = AnimationStatus.Nothing;
          actionStatus = ActionStatus.Nothing;
          nextCF.msgHereIsGlass(g.glass);
          return;
        }
      }
    } else if (actionStatus == ActionStatus.getGlassFromMachine) {
      for (MyGlass g : glasses) {
        if (g.status == GlassStatus.Ready) {
          print("popup" + myIndex + "popup released the glass");
          glasses.remove(g);
          animationStatus = AnimationStatus.Nothing;
          actionStatus = ActionStatus.Nothing;
          robots.get(g.robotIndex).status = RobotStatus.Empty;
          print("" + myIndex + "machine " + g.getRobotIndex() + " is set to empty!~~~~~");
          nextCF.msgHereIsGlass(g.glass);
          conveyor.msgPopupAvailable();
          return;
        }
      }
    }
  }
Ejemplo n.º 2
0
 public void fixRobot(int i) {
   for (MyGlass g : glasses) {
     if (g.robotIndex == i && g.status == GlassStatus.Handling) {
       glasses.remove(g);
       robots.get(i).status = RobotStatus.Empty;
       conveyor.msgPopupAvailable();
       stateChanged();
       break;
     }
   }
 }