[Avida-cvs] [Avida2-svn] r56 - trunk/source/python/AvidaGui2

baerb at myxo.css.msu.edu baerb at myxo.css.msu.edu
Tue Mar 15 12:26:51 PST 2005


Author: baerb
Date: 2005-03-15 15:26:51 -0500 (Tue, 15 Mar 2005)
New Revision: 56

Modified:
   trunk/source/python/AvidaGui2/pyPetriDishCtrl.py
Log:
Added extractPopulationSlot to send all organisms in population to be frozen.
 


Modified: trunk/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyPetriDishCtrl.py	2005-03-15 20:23:32 UTC (rev 55)
+++ trunk/source/python/AvidaGui2/pyPetriDishCtrl.py	2005-03-15 20:26:51 UTC (rev 56)
@@ -114,3 +114,16 @@
         self.m_cell_info[xm][ym].setBrush(QBrush(color))
         self.m_cell_info[xm][ym].setPen(QPen(color))
     self.m_canvas.update()
+    
+  def extractPopulationSlot(self):
+    population_dict = {}
+    world_w = cConfig.GetWorldX()
+    world_h = cConfig.GetWorldY()
+    for x in range(world_w):
+      for y in range(world_h):
+        cell = self.m_avida.m_population.GetCell(x + world_w*y)
+        if cell.IsOccupied() == True:
+          organism = cell.GetOrganism()
+          genome = organism.GetGenome()
+          population_dict[cell.GetID()] = str(genome.AsString())
+    self.emit(PYSIGNAL("freezeDishPhaseIISig"), ("/freezer", population_dict, ))




More information about the Avida-cvs mailing list