This commit is contained in:
Radovan Kofira 2020-11-10 21:54:31 +01:00
parent 66e7bf7fad
commit d17289c942

View File

@ -91,23 +91,21 @@ int count_targets(struct station* station){
counter+=1; counter+=1;
newCar=newCar->next; newCar=newCar->next;
} }
}
return counter;
}
int count_capacity(struct station* station){
int counter=0;
for(int i=0;i<station->track_count;i++){
struct car* newCar= station->tracks[i];
while (newCar->value!=NULL)
{
counter;+=1;
newCar=newCar->next;
}
} }
return counter; return counter;
} }
int count_capacity(struct station* station){
int count=0;
for(int i=0;i<station->track_count;i++){
struct car* newCar= station->tracks[i];
while (newCar->value!=NULL)
{
count+=1;
newCar=newCar->next;
}
}
return count;
}