This commit is contained in:
Džubara 2024-11-04 14:10:40 +01:00
parent 557451ce56
commit 8537720012

View File

@ -57,7 +57,15 @@ int index = select_track(station, target);
} }
int count_targets(struct station* station){ int count_targets(struct station* station){
return 0; int count = 0;
for (int i = 0; i < station->track_count; ++i) {
struct car* current = station->tracks[i];
while (current) {
++count;
current = current->next;
}
}
return count;
} }
int count_capacity(struct station* station){ int count_capacity(struct station* station){