mirror of
https://gitlab.com/klmp200/LO41.git
synced 2026-10-16 23:49:21 +00:00
huge refactor, pointy pointer
This commit is contained in:
1 parent
f6f12b398d
commit
9b11ae0835
8 files changed
+45
-35
No files matched your search
+3
-3
@@ -12,16 +12,16 @@ GETTER(Visitor, int, id);
|
||||
void * runnable_Visitor(void * void_this){
|
||||
Visitor *this = (Visitor*) void_this;
|
||||
SharedData * data = GET_INSTANCE(SharedData);
|
||||
Passenger passenger;
|
||||
Passenger * passenger = NEW(Passenger, (void*) this, VISITOR);
|
||||
|
||||
AGENT_OPTIONS;
|
||||
|
||||
passenger.visitor = this;
|
||||
passenger.type = VISITOR;
|
||||
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, (this->destination = data->use_call_box(data, this->contact_name)));
|
||||
data->main_building->go_to_floor(data->main_building, this->position, this->destination, passenger);
|
||||
DELETE(passenger);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user