public ArrayList<BuildingTemplate> generateCity(boolean genericRoad){
  int width=mapSettings.getBoardWidth();
  int height=mapSettings.getBoardHeight();
  int roads=mapSettings.getCityBlocks();
  roads=(roads * Math.min(width,height)) / 16;
  String cityType=mapSettings.getCityType();
  cityPlan=new HashSet<Coords>();
  if (genericRoad) {
    addGenericRoad();
  }
  if (cityType.equalsIgnoreCase("HUB"))   buildHubCity(width,height,roads);
 else   if (cityType.equalsIgnoreCase("METRO"))   buildMetroCity(width,height);
 else   if (cityType.equalsIgnoreCase("GRID"))   buildGridCity(width,height,(roads + 5) / 6);
 else   if (cityType.equalsIgnoreCase("TOWN"))   return buildTown(width,height,roads,mapSettings.getTownSize());
 else   return new ArrayList<BuildingTemplate>();
  return placeBuildings(0);
}

public ArrayList < BuildingTemplate > generateCity ( boolean genericRoad ) { int width = mapSettings . getBoardWidth ( ) ; int height = mapSettings . getBoardHeight ( ) ; int roads = mapSettings . getCityBlocks ( ) ; roads = ( roads * Math . min ( width , height ) ) / 16 ; String cityType = mapSettings . getCityType ( ) ; cityPlan = new HashSet < Coords > ( ) ; if ( genericRoad ) { addGenericRoad ( ) ; } if ( cityType . equalsIgnoreCase ( "HUB" ) ) buildHubCity ( width , height , roads ) ; else if ( cityType . equalsIgnoreCase ( "METRO" ) ) buildMetroCity ( width , height ) ; else if ( cityType . equalsIgnoreCase ( "GRID" ) ) buildGridCity ( width , height , ( roads + 5 ) / 6 ) ; else if ( cityType . equalsIgnoreCase ( "TOWN" ) ) return buildTown ( width , height , roads , mapSettings . getTownSize ( ) ) ; else return new ArrayList < BuildingTemplate > ( ) ; return placeBuildings ( 0 ) ; }
this function will generate a city with a grid lay out . 4 rounds running north and south and 4 roads running east west
