Hi again, I have found that getPotentialProduction/getMaximumPotential for Tile/BuildingType produces different results than the actual production (ColonyTile/Building) even when the results should be the same.
When looking into the code I have noticed all sorts of issues with modifiers not being applied. Some of these issues only affect methods used by the AI, while other issues affect the actual production. For example, an expert farmer never gets the additional (expert) bonus from the grain resource. I think the best solution for these problems is having a separate class for calculating production/consumption -- and that this class gets the list of modifiers for the colony and player as parameters. This way, we can use the same code everywhere (potential, maximum and actual production) and Tile+ColonyTile+Building+Colony gets simplified. The main problem with the rewrite is lack of tests for the correct tile production values ... so it would be really helpful if someone would make tables/lists with the correct values for each combination of: * Tile type * Resource * Tile improvements (plow, minor river, major river and/or road) * Worker type (unattended, petty criminal, indentured servant, colonist, convert, expert) * Liberty bonuses (-2, -1, 0, +1, +2) That's lots of combinations and numbers ... but only having a complete set for one resource (grain) would help immensely. Please do tell if you can help make these tables/lists :-) Best wishes, Stian Grenborgen _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers