mirror of
https://gitlab.com/klmp200/LO41.git
synced 2025-07-12 04:39:23 +00:00
To the moooo.... oh wait, not yet.
This commit is contained in:
@ -212,12 +212,7 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
|
||||
this->elevators[elevator_number]->name, origin);
|
||||
|
||||
pthread_cond_wait(this->condition_floors[destination], this->mutex_cond_get_outside_elevator);
|
||||
if (passenger->type == RESIDENT)
|
||||
printf("Le résident %s sort de l'ascenseur %s à l'étage %d\n", passenger->get_name(passenger),
|
||||
this->elevators[elevator_number]->name, destination);
|
||||
else if (passenger->type == VISITOR)
|
||||
printf("Le visiteur %s sort de l'ascenseur %s à l'étage %d\n", passenger->get_name(passenger),
|
||||
this->elevators[elevator_number]->name, destination);
|
||||
this->elevators[elevator_number]->remove_passenger(this->elevators[elevator_number], passenger);
|
||||
}else{
|
||||
if (passenger->type == RESIDENT)
|
||||
printf("Le résident %s à l'étage %d n'a pas pu rentrer dans un ascenseur. Préempté !\n", passenger->get_name(passenger), origin);
|
||||
|
Reference in New Issue
Block a user