Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/VDM/VDMSL/ConwayGameLifeSL/src/gui/   (Wiener Entwicklungsmethode ©)  Datei vom 13.4.2020 mit Größe 760 B image not shown  

Quelle  Model.java   Sprache: JAVA

 
package gui;

import java.awt.Point;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;

class Model extends Observable implements Serializable {
 
 private static final long serialVersionUID = 1L;
    
    private List<Point> livingCells =new ArrayList<Point>();
    
    public Model() {
    }
    
    public void newLivingCell(Point newLiveCell){
    
     livingCells.add(newLiveCell);
        // Notify observers
        setChanged();
        notifyObservers("newLivingCell");
    }

 public void newSimulationRound() {
  setChanged();
        notifyObservers("newRound"); 
        livingCells.clear();
 }

 public List<Point> getLivingCells() {
  return new ArrayList<Point>(livingCells);
 }
 
}

88%


¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.