Package com.heatonresearch.aifh.examples.ca.mergelife.physics

Examples of com.heatonresearch.aifh.examples.ca.mergelife.physics.Physics


     *
     * @param row The row of the universe to generate mutations from.
     * @param col The column of the universe to generate mutations from.
     */
    public synchronized void mutateAcross(final int row, final int col) {
        final Physics sourcePhysics = this.grid[row][col].getUniverseRunner()
                .getPhysics();
        for (int currentRow = 0; currentRow < this.rows; currentRow++) {
            for (int currentCol = 0; currentCol < this.cols; currentCol++) {
                if (currentRow != row || currentCol != col) {
                    this.grid[currentRow][currentCol].getUniverseRunner()
View Full Code Here


     * @param row The row.
     * @param col The column.
     */
    public void runSingular(final int row, final int col) {
        this.owner.performStop();
        final Physics sourcePhysics = this.grid[row][col].getUniverseRunner()
                .getPhysics();
        final SingularUniverseViewer v = new SingularUniverseViewer(
                sourcePhysics, 2);
        v.setVisible(true);
    }
View Full Code Here

                / MultiverseViewer.getConfig().getZoom();
        final int height = MultiverseViewer.getConfig().getPaneHeight()
                / MultiverseViewer.getConfig().getZoom();

        final Universe universe = new Universe(height, width, 3);
        final Physics physics = new MergePhysics(universe);

        universe.randomize(rnd);
        physics.randomize();

        this.universeRunner = new UniverseRunner(universe, physics);
        this.visualizer = new UniverseVisualizer(universe,
                MultiverseViewer.getConfig().getZoom());
    }
View Full Code Here

    public void componentResized(final ComponentEvent e) {
        final int width = getWidth() / this.zoom;
        final int height = getHeight() / this.zoom;

        final Universe universe = new Universe(height, width, 3);
        final Physics physics = new MergePhysics(universe);
        physics.copyData(this.sourceData);
        universe.randomize(this.rnd);
        this.runner = new UniverseRunner(universe, physics);
        this.visual = new UniverseVisualizer(universe, this.zoom);

        if (!this.running) {
View Full Code Here

TOP

Related Classes of com.heatonresearch.aifh.examples.ca.mergelife.physics.Physics

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.