Aktualizovat du6/a_station.c
This commit is contained in:
parent
f1e2f5546e
commit
8ef08b72cc
@ -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;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user