#ifndef SEGMENT_H_
#define SEGMENT_H_

#include <stddef.h>
#include <stdint.h>

#include "train.h"

typedef struct _Train Train;
typedef struct _Segment Segment;

typedef struct _Segment {
  int32_t segment_id;
  Train *train;
  Segment *connected_to[2];
  uint8_t connected_to_count;
} Segment;

// This is to shortcut the type hierarchy
typedef Segment SimpleSegment;

Segment **get_connected_to(Segment *);
uint32_t get_connected_to_count(Segment *);
Train *get_train(Segment *);

#endif /* SEGMENT_H_ */
