vagon
This commit is contained in:
parent
dd25e0be0a
commit
d04e057d86
@ -59,7 +59,7 @@ int get_target_capacity(struct station* station,const char* target){
|
||||
int kolaj = select_track (station, target); // z targetu zistim o ktoru kolaj sa jedna
|
||||
struct car* vagon = station -> tracks[kolaj]; // nacitam si vagon nech zistim jeho kapacitu
|
||||
while (vagon) {
|
||||
if (strcmp (kolaj -> value, target) == 0) {// skopirovane z add capacity
|
||||
if (strcmp (vagon -> value, target) == 0) {// skopirovane z add capacity
|
||||
return vagon -> capacity;
|
||||
}
|
||||
vagon = vagon -> next; //ak nenajdem zhodu, skusim dalsi vagon na kolaji
|
||||
|
||||
Loading…
Reference in New Issue
Block a user