Class LifeCycle
java.lang.Object
org.woehlke.computer.kurzweil.tabs.simulatedevolution.model.LifeCycle
- All Implemented Interfaces:
Serializable
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
- See Also:
-
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
-