Aktualizovat du6/a_station.c

This commit is contained in:
Tomáš Vlček 2026-04-22 23:58:23 +00:00
parent f1e2f5546e
commit 8ef08b72cc

View File

@ -52,5 +52,14 @@ int count_targets(struct station* station){
}
int count_capacity(struct station* station){
int count = 0;
for (int i = 0; i < station->track_count, i++)
{
struct car* currentTracks = station->tracks[i];
while (currentTracks->next != NULL)
{
count += currentTracks->capacity;
}
}
return 0;
}