dokoncenie
This commit is contained in:
parent
c68892c333
commit
f48b7e3489
@ -81,12 +81,12 @@ int count_targets(struct station* station){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int count_capacity(struct station* station){
|
int count_capacity(struct station* station){
|
||||||
int counter=1;
|
int counter=0;
|
||||||
for(int i=0;i<station->track_count;i++){
|
for(int i=0;i<station->track_count;i++){
|
||||||
struct car* newCar= station->tracks[i];
|
struct car* newCar= station->tracks[i];
|
||||||
while (newCar->value!=NULL)
|
while (newCar->value!=NULL)
|
||||||
{
|
{
|
||||||
counter+=1;
|
counter+=newCar->capacity;
|
||||||
newCar=newCar->next;
|
newCar=newCar->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user