src/gui/model/SidePane.java
private void runButtonHandler() {
        if (worker != null && worker.isAlive()) {
            worker.interrupt();
        } else {
            stepButton.setDisable(true);
            iterations.setDisable(true);
            realTimeUpdates.setDisable(true);
            worker = new Thread(this::runModel);
            worker.start();
            runButton.setText("Stop");
        }
    }
/**
     * If the model isn't running, this creates a thread
     * and kicks it off. Otherwise, it stops the thread
     * and cleans up.
     */
If the model isn't running, this creates a thread
and kicks it off. Otherwise, it stops the thread
and cleans up.
If the model isn ' t running this creates a thread and kicks it off . Otherwise it stops the thread and cleans up .
private void runButtonHandler() {
        if (worker != null && worker.isAlive()) {
            worker.interrupt();
        } else {
            stepButton.setDisable(true);
            iterations.setDisable(true);
            realTimeUpdates.setDisable(true);
            worker = new Thread(this::runModel);
            worker.start();
            runButton.setText("Stop");
        }
    }
private void runButtonHandler ( ) { if ( worker != null && worker . isAlive ( ) ) { worker . interrupt ( ) ; } else { stepButton . setDisable ( true ) ; iterations . setDisable ( true ) ; realTimeUpdates . setDisable ( true ) ; worker = new Thread ( this :: runModel ) ; worker . start ( ) ; runButton . setText ( "Stop" ) ; } }
If the model isn't running, this creates a thread
 and kicks it off.
If the model isn ' t running this creates a thread and kicks it off .