This commit is contained in:
Džubara 2024-11-04 14:09:52 +01:00
parent b628b7e760
commit 557451ce56

View File

@ -61,6 +61,13 @@ int count_targets(struct station* station){
} }
int count_capacity(struct station* station){ int count_capacity(struct station* station){
return 0; int total_capacity = 0;
for (int i = 0; i < station->track_count; ++i) {
struct car* current = station->tracks[i];
while (current) {
total_capacity += current->capacity;
current = current->next;
}
}
return total_capacity;
} }