Package de.ailis.xadrian.data.factories

Examples of de.ailis.xadrian.data.factories.RaceFactory


     * 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
View Full Code Here


    {
        this.id = id;
        this.nid = nid;
        this.messageId = "game." + id;
        this.sunFactory = new SunFactory(this);
        this.raceFactory = new RaceFactory(this);
        this.wareFactory = new WareFactory(this);
        this.sectorFactory = new SectorFactory(this);
        this.factoryFactory = new FactoryFactory(this);
    }
View Full Code Here

TOP

Related Classes of de.ailis.xadrian.data.factories.RaceFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.