private BaseDictionary[] InitialiseMetroNetwork() { StationDictionary stationDiction = new StationDictionary(APIHandler.GetStationList()); LineDictionary lineDiction = new LineDictionary(APIHandler.GetLineList(), APIHandler.GetLineColors()); MetroNetwork.Initialise(stationDiction, lineDiction); BaseDictionary[] dictionaries = new BaseDictionary[] { stationDiction, lineDiction }; return(dictionaries); }
// constructor public Backend() { // instantiating variables List <string> tempList = new List <string>(); Children = new List <Node>(); // api requests tempList = APIHandler.GetLineList(); // makes request for list of lines LineDiction = new LineDictionary(tempList, APIHandler.GetLineColors()); // sets up line dictionary tempList = APIHandler.GetStationList(); // makes request for station list StationDiction = new StationDictionary(tempList); // sets up station dictionary MetroNetwork.Initialise(StationDiction, LineDiction); // sets up network structure }