From f13083c85626d8cc49fdba20303eb3ae6444a5c9 Mon Sep 17 00:00:00 2001 From: Yevhen Kozirovskyi Date: Fri, 8 Nov 2024 00:15:44 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20cv6/a=5Fstation.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv6/a_station.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cv6/a_station.h b/cv6/a_station.h index e69de29..a1060e0 100644 --- a/cv6/a_station.h +++ b/cv6/a_station.h @@ -0,0 +1,28 @@ +#ifndef STATION_H +#define STATION_H + +#define STATION_SIZE 10 + +#define TARGET_SIZE 36 + +struct car { + char value[TARGET_SIZE]; + int capacity; + struct car* next; +}; + + +struct station { + struct car** tracks; + int track_count; +}; + +struct station* create_station(); +void destroy_station(struct station* station); +int select_track(struct station* station, const char* target); +void add_target_capacity(struct station* station, const char* target, int capacity); +int get_target_capacity(struct station* station, const char* target); +int count_targets(struct station* station); +int count_capacity(struct station* station); + +#endif