* complex running stable.
*/
private void calculateBaseComplex()
{
final FactoryFactory factoryFactory = this.game.getFactoryFactory();
final RaceFactory raceFactory = this.game.getRaceFactory();
final Ware crystals = this.game.getWareFactory().getWare("crystals");
final Config config = Config.getInstance();
long currentPrice;
long price;
final List<ComplexFactory> backup = new ArrayList<ComplexFactory>();
// First of all remove all automatically added factories
this.autoFactories.clear();
updateShoppingList();
if (!this.addBaseComplex) return;
// First of all we build a base complex without specific crystal fab
// race and remember the price
while (true)
if (!addBaseComplex(null)) break;
currentPrice = getTotalPrice();
// Now cycle over all races and check if the complex gets cheaper if
// the crystal fabs are bought from them
for (final Race race: raceFactory.getRaces())
{
// If race is ignored then don't use it
if (config.isRaceIgnored(race)) continue;
// If race has no crystal fabs then don't use it