This commit is contained in:
Anton Dolozin 2025-11-05 00:17:31 +01:00
parent f7558fb7bf
commit 345d2a79e5

View File

@ -77,6 +77,16 @@ void add_target_capacity(struct station* station,const char* target, int capacit
}
int get_target_capacity(struct station* station,const char* target){
struct car* ptr = *station->tracks;
while (ptr)
{ if(strcmp(ptr->value, target) == 0){
return ptr->capacity;
}
ptr = ptr->next;
/* code */
}
return 0;
}