1
0
mirror of https://gitlab.com/klmp200/LO41.git synced 2025-07-10 19:59:24 +00:00

Petit refactor avec des signaux

This commit is contained in:
2018-06-15 11:50:38 +02:00
parent 741a98f926
commit ab17d4fa0e
10 changed files with 56 additions and 17 deletions

View File

@ -12,8 +12,12 @@ GETTER(Visitor, int, id);
void * runnable_Visitor(void * void_this){
Visitor *this = (Visitor*) void_this;
SharedData * data = GET_INSTANCE(SharedData);
Passenger passenger;
passenger.visitor = this;
printf("Bonjour, je suis %s et je souhaite rendre visite a %s\n", this->name, this->contact_name);
printf("Bip, %s appel a l'interphone\n%s habite a l'etage %d\n", this->name, this->contact_name, data->use_call_box(data, this->contact_name));
printf("Bip, %s appel a l'interphone\n%s habite a l'etage %d\n", this->name, this->contact_name, (this->destination = data->use_call_box(data, this->contact_name)));
data->main_building->go_to_floor(data->main_building, this->position, this->destination, passenger, VISITOR);
return NULL;
}