Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

C functions available in sccharts by including readparams.h:

void readTrainPositions(int* aiTrainPositions, int num_trains);

Read initial train positions from a local JSON configuration file and inserts it in the int array aiTrainPositions.

void getAction(int* aiAction);

Read a new action's data from stdin and inserts it into the int array aiAction. aiAction will then contain {id, start, destination, reverse flag}. If one or more fields are set to -1 the action is to be considered invalid and ignored.

  • No labels