barsuift.simLife.tree
Class BasicTree
java.lang.Object
barsuift.simLife.tree.BasicTree
- All Implemented Interfaces:
- LivingPart, Persistent<State>, Tree
public class BasicTree
- extends java.lang.Object
- implements Tree
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicTree
public BasicTree(Universe universe,
TreeState state)
getAge
public int getAge()
- Specified by:
getAge in interface LivingPart
spendTime
public void spendTime()
- Make all branches spend time
- Specified by:
spendTime in interface LivingPart
getHeight
public float getHeight()
- Specified by:
getHeight in interface Tree
getNbBranches
public int getNbBranches()
- Specified by:
getNbBranches in interface Tree
getEnergy
public java.math.BigDecimal getEnergy()
- Return the sum of branch energies
- Specified by:
getEnergy in interface Tree
getNbLeaves
public int getNbLeaves()
- Specified by:
getNbLeaves in interface Tree
getBranches
public java.util.List<TreeBranch> getBranches()
- Specified by:
getBranches in interface Tree
getState
public TreeState getState()
- Specified by:
getState in interface Persistent<State>
synchronize
public void synchronize()
- Specified by:
synchronize in interface Persistent<State>
getTree3D
public Tree3D getTree3D()
- Specified by:
getTree3D in interface Tree
getTrunk
public TreeTrunk getTrunk()
- Specified by:
getTrunk in interface Tree
Copyright © 2010. All Rights Reserved.