public List <Person> PersonLeaveAWithoutCleaner(Elevator elevator) { int i = 0; List <Person> temp2 = new List <Person>(); foreach (var person in WaitingPeople) { if (person.Rank != 3) { elevator.PersonEnter(person); temp2.Add(person); i++; } } foreach (var person in temp2) { WaitingPeople.Remove(person); } var people = temp2.ToList(); return(people); }
public void ElevatorMove(Level level, Elevator elevator) { elevator.CurrentLevel = level; }