//radiate pheromones
//Eclipse thinks pheromones is spelled wrong. More biologists should build IDEs. Or tech dictionaries.
Set<Point> patchKeys = patchMatrix.keySet();
for ( Point k : patchKeys )
{
Patch centerPatch = patchMatrix.get( k );
if ( centerPatch.getStinkLevel() > 1 )
{
List<Point> adjoiningLocations = mapper.getAllAdjoining( centerPatch.getPosition() );
for ( Point adjoiningLocation : adjoiningLocations )
{
patchMatrix.get( adjoiningLocation ).setStinkLevelWithoutExceeding( centerPatch.getStinkLevel() - 1 );
}
}
}
clearTheBoard();
//draw patches that stink
for ( Point k : patchKeys )
{
Patch p = patchMatrix.get( k );
if ( p.getStinkLevel() > 0 )
p.paint();
}
//draw cells
for ( SimulationObject so : population )
{
so.paint();