[Avida-SVN] r2215 - in branches/energy/source: main targets/avida-viewer
beckma24 at myxo.css.msu.edu
beckma24 at myxo.css.msu.edu
Fri Nov 30 09:57:01 PST 2007
Author: beckma24
Date: 2007-11-30 12:57:00 -0500 (Fri, 30 Nov 2007)
New Revision: 2215
Modified:
branches/energy/source/main/cPopulation.cc
branches/energy/source/targets/avida-viewer/cZoomScreen.cc
Log:
Added condition to deme-age-noBirth to check for empty demes, (all dead organisms)
Modified: branches/energy/source/main/cPopulation.cc
===================================================================
--- branches/energy/source/main/cPopulation.cc 2007-11-29 20:54:06 UTC (rev 2214)
+++ branches/energy/source/main/cPopulation.cc 2007-11-30 17:57:00 UTC (rev 2215)
@@ -1141,7 +1141,7 @@
}
case 6: {
// Replicate old demes
- if(source_deme.GetAge() < m_world->GetConfig().MAX_DEME_AGE.Get())
+ if(source_deme.GetAge() < m_world->GetConfig().MAX_DEME_AGE.Get() && source_deme.GetOrgCount() > 0)
continue;
break;
}
Modified: branches/energy/source/targets/avida-viewer/cZoomScreen.cc
===================================================================
--- branches/energy/source/targets/avida-viewer/cZoomScreen.cc 2007-11-29 20:54:06 UTC (rev 2214)
+++ branches/energy/source/targets/avida-viewer/cZoomScreen.cc 2007-11-30 17:57:00 UTC (rev 2215)
@@ -507,13 +507,13 @@
// Show the location of the CPU we are looking at.
SetBoldColor(COLOR_CYAN);
- Print(1, 40, "[%2d, %2d] ",
+ Print(1, 40, "[%2d, %2d] ", //location (WRONG)
info.GetActiveID() % population.GetWorldX(),
info.GetActiveID() / population.GetWorldY());
// Now show the location of the CPU we are facing.
int id = info.GetActiveCell()->ConnectionList().GetFirst()->GetID();
- Print(2, 40, "[%2d, %2d] ",
+ Print(2, 40, "[%2d, %2d] ", //facing
id % population.GetWorldX(), id / population.GetWorldY());
More information about the Avida-cvs
mailing list