This commit is contained in:
Džubara 2024-11-04 14:00:46 +01:00
parent 34f0cde627
commit 47b2d968ce

View File

@ -13,9 +13,15 @@ void destroy_station(struct station* station){
} }
int select_track(struct station* station, const char* target){ int select_track(struct station* station, const char* target){
return 0; unsigned long hash = 5381;
int c;
while ((c = *target++)) {
hash = ((hash << 5) + hash) + c; // hash * 33 + c
}
return hash % station->track_count;
} }
void add_target_capacity(struct station* station,const char* target, int capacity){ void add_target_capacity(struct station* station,const char* target, int capacity){
} }