Package barsuift.simLife.universe

Examples of barsuift.simLife.universe.BasicUniverseContextFactory


        }
    }

    public void testOpen() throws OpenException, SaveException {
        // create a test file to be read
        BasicUniverseContextFactory factory = new BasicUniverseContextFactory();
        UniverseContext universeContext = factory.createRandom();
        UniverseContextIO io = new UniverseContextIO(saveFile);
        io.write(universeContext);
        // now try to read it
        UniverseContext universeContext2 = application.openUniverse(saveFile);
        assertEquals(universeContext.getState(), universeContext2.getState());
View Full Code Here


        this.window.createMenuBar(this);
        this.window.setVisible(true);
    }

    public UniverseContext createEmptyUniverse() {
        BasicUniverseContextFactory factory = new BasicUniverseContextFactory();
        this.currentUniverseContext = factory.createEmpty();
        this.currentSaveFile = null;
        this.window.changeUniverse(currentUniverseContext);
        setChanged();
        notifyObservers(ApplicationUpdateCode.NEW_EMPTY);
        return currentUniverseContext;
View Full Code Here

        notifyObservers(ApplicationUpdateCode.NEW_EMPTY);
        return currentUniverseContext;
    }

    public UniverseContext createRandomUniverse() {
        BasicUniverseContextFactory factory = new BasicUniverseContextFactory();
        this.currentUniverseContext = factory.createRandom();
        this.currentSaveFile = null;
        this.window.changeUniverse(currentUniverseContext);
        setChanged();
        notifyObservers(ApplicationUpdateCode.NEW_RANDOM);
        return currentUniverseContext;
View Full Code Here

        }
    }

    public void testOpen() throws OpenException, SaveException {
        // create a test file to be read
        BasicUniverseContextFactory factory = new BasicUniverseContextFactory();
        UniverseContext universeContext = factory.createRandom();
        UniverseContextIO io = new UniverseContextIO(saveFile);
        io.write(universeContext);
        // now try to read it
        UniverseContext universeContext2 = application.openUniverse(saveFile);
        assertEquals(universeContext.getState(), universeContext2.getState());
View Full Code Here

        this.window.createMenuBar(this);
        this.window.setVisible(true);
    }

    public UniverseContext createEmptyUniverse() {
        BasicUniverseContextFactory factory = new BasicUniverseContextFactory();
        this.currentUniverseContext = factory.createEmpty();
        this.currentSaveFile = null;
        this.window.changeUniverse(currentUniverseContext);
        setChanged();
        notifySubscribers(ApplicationUpdateCode.NEW_EMPTY);
        return currentUniverseContext;
View Full Code Here

        notifySubscribers(ApplicationUpdateCode.NEW_EMPTY);
        return currentUniverseContext;
    }

    public UniverseContext createRandomUniverse() {
        BasicUniverseContextFactory factory = new BasicUniverseContextFactory();
        this.currentUniverseContext = factory.createRandom();
        this.currentSaveFile = null;
        this.window.changeUniverse(currentUniverseContext);
        setChanged();
        notifySubscribers(ApplicationUpdateCode.NEW_RANDOM);
        return currentUniverseContext;
View Full Code Here

TOP

Related Classes of barsuift.simLife.universe.BasicUniverseContextFactory

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.