
class Route {

  // routes.csv: "line","name","colour","stripe"
  Integer line;
  String name;
  color colour,stripe;

  Route(Integer line, String name, color colour, color stripe) {
    this.line = line;
    this.name = name;
    this.colour = colour;
    this.stripe = stripe;
  }

}

void parseRoutes() {
  String strings[] = loadStrings("routes.csv");
  for (int i = 1; i < strings.length; i++) {
    // routes.csv: "line","name","colour","stripe"
    String words[] = split(strings[i],",");
    Integer line = new Integer(words[0]);
    String name = words[1];
    color colour = stringToColor(words[2]);
    color stripe = stringToColor(words[3]);
    routes.put(line,new Route(line,name,colour,stripe));
  }
}
