Project: atomswarm / Class: AtomSwarmGenetic
- classes:
- Atom
- AtomGenetic
- AtomSwarm
- AtomSwarmGenetic
- AtomFood
Processing swarm classes with genetic and metabolic extensions.
Class: AtomSwarmGenetic
Subclass of AtomSwarm.
Encapsulates a population of AtomGenetic agents, and maintains deposits of AtomFood.
Variables
- AtomFood [] food - array of food deposits.
- int foot_count - number of objects in food.
Methods
AtomSwarmGenetic ()
Creates a new swarm with empty population.
void addFood (int count)
Adds a deposit of count food objects, grouped together around a random point in the environment.
void addFood (float x, float y)
Adds a single AtomFood object at the specified co-ordinates.
void removeFood (AtomFood morsel)
Removes the specfied food object.

