# HG changeset patch # User Andrew # Date 1661635768 14400 # Sat Aug 27 17:29:28 2022 -0400 # Node ID 5577336fa02aea1e49738b0c9122073194e8a7b9 # Parent adc768d8e44398ca4090ffe0c665d9f4a3c4721b Refactor years into a static variable, enabled 1920, which is now working. 1930 isn't working yet. diff --git a/src/main/java/com/ajtjp/gearCity/Main.java b/src/main/java/com/ajtjp/gearCity/Main.java --- a/src/main/java/com/ajtjp/gearCity/Main.java +++ b/src/main/java/com/ajtjp/gearCity/Main.java @@ -47,6 +47,8 @@ //Prior to that, it might decrease when we load EE1 cities from the DB static int nextXMLID = 125; + final static int[] years = { 1900, 1910, 1920 }; + public static void main(String[] args) throws Exception { // testXMLExport(); @@ -93,7 +95,6 @@ updateExistingXMLCities(citiesAlreadyExisting, cityDB); - int[] years = { 1900, 1910 }; for (int year : years) { //Re-import so we don't add cities to the XML more than once cityDB = ImportCitiesFromXMLFile(cityDB, citiesAlreadyExisting); @@ -197,7 +198,6 @@ if (!region.getCountry().getName().isEmpty()) { //eventually, we'll have an optional filter for e.g. a France-only game List regionData = RegionalDemographicsDB.demographicsByRegion.get(region.getName()); List citiesInRegion = region.getCitiesInRegion(); - int[] years = { 1900, 1910 }; for (int year : years ) { int totalPop = 0; for (CityDB city : citiesInRegion) {