Ejemplo n.º 1
0
 public LiftStatusText(Program myProgram, LiftSystem lift, HangarManager hangarMgr, MechanicManager mechMgr)
 {
     this.screen    = new List <string>();
     this.myProgram = myProgram;
     this.lift      = lift;
     this.hangarMgr = hangarMgr;
     this.mechMgr   = mechMgr;
 }
Ejemplo n.º 2
0
 public LiftSystem(Program myProgram, HangarManager hangarMgr, MechanicManager mechMgr)
 {
     this.myProgram      = myProgram;
     this.hangarMgr      = hangarMgr;
     this.mechMgr        = mechMgr;
     this.hangarsWaiting = new Stack <string>();
     this.currentHangar  = "";
     this.direction      = LiftDirection.Stopped;
     this.actionQueue    = new List <MechanicAction>();
 }
Ejemplo n.º 3
0
        public SetupHangarLiftSlot(Program myProgram, MechanicManager mechMgr, HangarManager hangarMgr)
        {
            this.myProgram = myProgram;
            this.hangarMgr = hangarMgr;

            List <IHangarMechanic> hangars = this.hangarMgr.getAllHangar();

            foreach (var hangar in hangars)
            {
                HangarLiftSlot liftSlotMech = hangar.getLiftSlotMech();
                liftSlotMech.execAction("checkAttached");
            }
        }
Ejemplo n.º 4
0
        public Lift(Program myProgram)
        {
            this.myProgram = myProgram;

            this.mechMgr = new MechanicManager();
            this.mechMgr.add(new Climber(myProgram, this.totalSubFloors));

            this.hangarMgr = new HangarManager();
            this.hangarMgr.add(new HangarMechanic(this, 2, "1"));

            this.liftSys = new LiftSystem(myProgram, this.hangarMgr, this.mechMgr);
            this.txt     = new LiftStatusText(myProgram, this.liftSys, this.hangarMgr, this.mechMgr);

            this.setupList = new Stack <ISetupMechanic>();
            this.setupList.Push(new SetupClimber(myProgram, this.mechMgr));
            this.setupList.Push(new SetupHangarLiftSlot(myProgram, mechMgr, this.hangarMgr));
        }
Ejemplo n.º 5
0
 public SetupClimber(Program myProgram, MechanicManager mechMgr)
 {
     this.myProgram = myProgram;
     this.climber   = (Climber)mechMgr.getMechanic("climber");
     this.climber.queueAction("down");
 }