Class SimulatedEvolutionModel

java.lang.Object
java.util.concurrent.ForkJoinTask<java.lang.Void>
org.woehlke.computer.kurzweil.tabs.simulatedevolution.SimulatedEvolutionModel
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.Future<java.lang.Void>, Startable, TabModel, SimulatedEvolution

public class SimulatedEvolutionModel
extends java.util.concurrent.ForkJoinTask<java.lang.Void>
implements TabModel, SimulatedEvolution
The World contains Water, Cells and Food. It is the Data Model of the Simulation in a MVC Pattern.
Author:
Thomas Woehlke User: thomas Date: 04.02.2006 Time: 19:06:20
See Also:
Cell, Simulated Evolution. Artificial Life Simulation of Bacteria Motion depending on DNA. 2006 - 2008 Thomas Woehlke. http://thomas-woehlke.de/p/simulated-evolution/, Serialized Form
  • Field Summary

    Fields inherited from interface org.woehlke.computer.kurzweil.tabs.simulatedevolution.SimulatedEvolution

    TAB_TYPE
  • Constructor Summary

    Constructors
    Constructor Description
    SimulatedEvolutionModel​(SimulatedEvolutionContext appCtx)  
  • Method Summary

    Modifier and Type Method Description
    boolean cancel​(boolean mayInterruptIfRunning)  
    void decreaseFoodPerDay()  
    protected boolean exec()
    One Step of Time in the World in which the Population of Bacteria Cell perform Life.
    java.util.List<Cell> getAllCells()  
    java.lang.Void getRawResult()  
    boolean hasFood​(int x, int y)  
    void increaseFoodPerDay()  
    protected void setRawResult​(java.lang.Void value)  
    void start()  
    void stop()  
    void toggleGardenOfEden()  

    Methods inherited from class java.util.concurrent.ForkJoinTask

    adapt, adapt, adapt, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollSubmission, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.concurrent.Future

    get, get, isCancelled, isDone
  • Constructor Details

  • Method Details

    • hasFood

      public boolean hasFood​(int x, int y)
    • toggleGardenOfEden

      public void toggleGardenOfEden()
    • start

      public void start()
      Specified by:
      start in interface Startable
    • stop

      public void stop()
      Specified by:
      stop in interface Startable
    • getAllCells

      public java.util.List<Cell> getAllCells()
    • increaseFoodPerDay

      public void increaseFoodPerDay()
    • decreaseFoodPerDay

      public void decreaseFoodPerDay()
    • cancel

      public boolean cancel​(boolean mayInterruptIfRunning)
      Specified by:
      cancel in interface java.util.concurrent.Future<java.lang.Void>
      Overrides:
      cancel in class java.util.concurrent.ForkJoinTask<java.lang.Void>
    • getRawResult

      public java.lang.Void getRawResult()
      Specified by:
      getRawResult in class java.util.concurrent.ForkJoinTask<java.lang.Void>
    • setRawResult

      protected void setRawResult​(java.lang.Void value)
      Specified by:
      setRawResult in class java.util.concurrent.ForkJoinTask<java.lang.Void>
    • exec

      protected boolean exec()
      One Step of Time in the World in which the Population of Bacteria Cell perform Life. Every Cell moves, eats, dies of hunger, and it has sex. splitting into two children with changed DNA.
      Specified by:
      exec in class java.util.concurrent.ForkJoinTask<java.lang.Void>