Exemple #1
0
    Street make_street(int lvl, Street.street_direction dir)
    {
        string dir_name   = dir == Street.street_direction.NS ? "N. " : "E. ";
        Street new_street = new Street(dir, dir_name + lvl + " Street");

        return(new_street);
    }
Exemple #2
0
 private void generate_streets()
 {
     for (int dir = 0; dir < 2; dir++) // 0 : N and 1 : E
     {
         for (int level = 0; level < GridLen + 1; level++)
         {
             Street.street_direction street_dir = (dir == 0)
                 ? Street.street_direction.NS
                 : Street.street_direction.EW;
             StreetsList[level, dir] = make_street(level, street_dir);
         }
     }
 }