Обновить cv6/a_station.h
This commit is contained in:
parent
fc5a3e59bf
commit
f13083c856
@ -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
|
Loading…
Reference in New Issue
Block a user