Package de.ailis.xadrian.data

Examples of de.ailis.xadrian.data.Factory


     * @param index
     *            The index of the factory to change
     */
    public void changeYield(final int index)
    {
        final Factory mineType = this.complex.getFactory(index);
        final SetYieldsDialog dialog = new SetYieldsDialog(mineType);
        dialog.setYields(this.complex.getYields(index));
        dialog.setSector(this.complex.getSector());
        if (dialog.open() == Result.OK)
        {
View Full Code Here


    public static void main(final String args[]) throws Exception
    {
        SwingUtils.prepareGUI();

        Game game = GameFactory.getInstance().getGame("x3tc");
        final Factory mineType =
            game.getFactoryFactory().getFactory("siliconMineL-teladi");
        final SetYieldsDialog dialog = new SetYieldsDialog(mineType);
        final List<Integer> yields = new ArrayList<Integer>();
        yields.add(10);
        yields.add(25);
View Full Code Here

        // Build the list with cheapest factories
        for (final Ware ware : game.getWareFactory().getWares())
        {
            for (final FactorySize size : factoryFactory.getFactorySizes(ware, false))
            {
                final Factory factory = factoryFactory.getCheapestFactory(ware,
                    size, false);
                if (factory != null) this.cheapest.add(factory);
            }
        }
        this.topLevel.add(this.cheapestEntry);
View Full Code Here

                            manuElement.attributeValue("sector"));
                    i++;
                }
                Arrays.sort(resources);
                Arrays.sort(storage);
                final Factory factory =
                    new Factory(this.game, nid, id, size, race, cycle,
                        product, price, volume, resources, storage,
                        manufacturers);
                this.factories.add(factory);
                this.factoryNidMap.put(nid, factory);
                this.factoryMap.put(id, factory);
View Full Code Here

     * @return The cheapest matching factory or null if none found.
     */
    public Factory getCheapestFactory(final Ware ware, final FactorySize size,
        final boolean useIgnores)
    {
        Factory cheapestFactory = null;
        int cheapestPrice = Integer.MAX_VALUE;
        for (final Factory factory : this.factories)
        {
            final boolean isIgnored = config.isRaceIgnored(factory.getRace());

View Full Code Here

TOP

Related Classes of de.ailis.xadrian.data.Factory

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.