java.lang.Object
org.woehlke.computer.kurzweil.tabs.simulatedevolution.model.LifeCycle

public class LifeCycle
extends java.lang.Object
State of the Cell which monitors age and getting enough food. After an minimum age and at a minimum af eaten food, the cell becomes able to reproduce by cell division. If there is not enough food, the cell will not move and later it will die. © 2006 - 2008 Thomas Woehlke. http://thomas-woehlke.de/p/simulated-evolution/
Author:
Thomas Woehlke Date: 04.02.2006 Time: 23:12:31
  • Constructor Summary

    Constructors
    Constructor Description
    LifeCycle()  
    LifeCycle​(int fatAtBirth)  
  • Method Summary

    Modifier and Type Method Description
    void eat​(int food)  
    int getFat()  
    LifeCycleStatus getLifeCycleStatus()  
    void haveSex()
    having sex by cell division changes age and fat.
    boolean isDead()  
    boolean isPregnant()  
    boolean move()
    moving consumes food energy

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LifeCycle

      public LifeCycle()
    • LifeCycle

      public LifeCycle​(int fatAtBirth)
  • Method Details

    • move

      public boolean move()
      moving consumes food energy
      Returns:
      true, if cell has enough energy to move.
    • haveSex

      public void haveSex()
      having sex by cell division changes age and fat.
    • isPregnant

      public boolean isPregnant()
      Returns:
      has enough age and fat for having sex.
    • isDead

      public boolean isDead()
      Returns:
      died by hunger. found and eaten too few food and so too few fat.
    • eat

      public void eat​(int food)
      Parameters:
      food - eat the found food and add the energy to the cells fat.
    • getFat

      public int getFat()
    • getLifeCycleStatus

      public LifeCycleStatus getLifeCycleStatus()