cv6
This commit is contained in:
parent
b628b7e760
commit
557451ce56
@ -61,6 +61,13 @@ int count_targets(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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user