Example #1
0
 def __init__(self, passengers: List[Person], maxFloor: int,
              capacity: int) -> None:
     self.passengers = passengers
     self.curFloor = 1
     self.maxFloor = maxFloor
     self.capacity = capacity
     self.passenNum = 0
     ElevatorSprite.__init__(self)
    def __init__(self, max_capacity: int) -> None:
        """Creates Elevator object with empty list of passengers and
        attributes inherited from superclass"""

        ElevatorSprite.__init__(self)
        self.passengers = []
        self.max_capacity = max_capacity
        self.floor = 1
 def __init__(self, capacity: int) \
         -> None:
     """
     Initialize a new elevator.
     """
     self.passengers = []
     self._capacity = capacity
     self.floor = 1
     ElevatorSprite.__init__(self)
Example #4
0
    def __init__(self, capacity: int) -> None:
        """Initialize an elevator with its maximum capacity.

        Precondition: capacity >= 1
        """
        self.passengers = []
        self.max_capacity = capacity
        self.position = 1
        ElevatorSprite.__init__(self)
Example #5
0
    def __init__(self, max_capacity: int) -> None:
        """
        Initialize a new elevator.

        Precondition: max_capacity >= 1
        """
        ElevatorSprite.__init__(self)
        self.max_capacity = max_capacity
        self.passengers = []
        self.current_floor = 1
Example #6
0
    def __init__(self, capacity: int) -> None:
        """
        initialize a new elevator

        Preconditions:
            capacity>=1
        """
        ElevatorSprite.__init__(self)
        self.capacity = capacity
        self.passengers = []
        self.floor = 1
Example #7
0
    def __init__(self, elevator_capacity: int) -> None:
        """Initialize a new Elevator

        Preconditions:
            maximum_capacity >= 1
            current_floor <= number of floors and current_floor >= 1
            current_capacity <= maximum_capacity and current_capacity >= 0
        """
        self.current_floor = 1
        self.maximum_capacity = elevator_capacity
        self.current_capacity = 0
        self.passengers = []
        ElevatorSprite.__init__(self)
Example #8
0
 def __init__(self, capacity: int) -> None:
     ElevatorSprite.__init__(self)
     self.current_floor = 1
     self.max_capacity = capacity
     self.passengers = []
 def __init__(self, capacity: int) -> None:
     """Initialize a new Elevator."""
     self.passengers = []
     self.capacity = capacity
     self.location = 1
     ElevatorSprite.__init__(self)
Example #10
0
 def __init__(self, passengers: List[Person], el_max: int) -> None:
     ElevatorSprite.__init__(self)
     self.current_floor = 1
     self.max_pass = el_max
     self.passengers = passengers