[Avida-SVN] r1095 - development/source/targets/avida-viewer

ofria at myxo.css.msu.edu ofria at myxo.css.msu.edu
Tue Nov 21 21:05:08 PST 2006


Author: ofria
Date: 2006-11-22 00:05:08 -0500 (Wed, 22 Nov 2006)
New Revision: 1095

Modified:
   development/source/targets/avida-viewer/cBarScreen.cc
   development/source/targets/avida-viewer/cHistScreen.cc
   development/source/targets/avida-viewer/cOptionsScreen.cc
   development/source/targets/avida-viewer/cScreen.h
   development/source/targets/avida-viewer/cStatsScreen.cc
   development/source/targets/avida-viewer/cView.cc
   development/source/targets/avida-viewer/cView.h
   development/source/targets/avida-viewer/cZoomScreen.cc
Log:
Some more internal and external clean-ups for ncurses viewer.


Modified: development/source/targets/avida-viewer/cBarScreen.cc
===================================================================
--- development/source/targets/avida-viewer/cBarScreen.cc	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cBarScreen.cc	2006-11-22 05:05:08 UTC (rev 1095)
@@ -19,7 +19,6 @@
 
   PrintOption(1, cur_x, option);
 
-  if (option.GetSize() < 6)  return cur_x+option.GetSize()+2;
   return cur_x+option.GetSize()+1;
 }
 
@@ -41,15 +40,15 @@
   int cur_x = 21;
 
   // Include options in their general order of importance.
-  cur_x = AddMenuOption("[M]ap", max_x, cur_x);
+  cur_x = AddMenuOption("[M]ap ", max_x, cur_x);
   cur_x = AddMenuOption("[S]tats", max_x, cur_x);
   cur_x = AddMenuOption("[A]nalyze", max_x, cur_x);
   cur_x = AddMenuOption("[Z]oom", max_x, cur_x);
   cur_x = AddMenuOption("[O]ptions", max_x, cur_x);
   cur_x = AddMenuOption("[H]ist", max_x, cur_x);
-  cur_x = AddMenuOption("[E]nv", max_x, cur_x);
-  cur_x = AddMenuOption("[B]lank", max_x, cur_x);
+  cur_x = AddMenuOption("[E]nv ", max_x, cur_x);
   cur_x = AddMenuOption("[P]ause", max_x, cur_x);
+  cur_x = AddMenuOption("[B]lank", max_x, cur_x);
   cur_x = AddMenuOption("[C]hoose CPU", max_x, cur_x);
 
   // Always place Quit as the last option.

Modified: development/source/targets/avida-viewer/cHistScreen.cc
===================================================================
--- development/source/targets/avida-viewer/cHistScreen.cc	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cHistScreen.cc	2006-11-22 05:05:08 UTC (rev 1095)
@@ -22,7 +22,7 @@
 				int max_stars, int star_size)
 {
   SetBoldColor(COLOR_CYAN);
-  PrintFitness(in_pos, 0, in_gen->GetFitness());
+  PrintDouble(in_pos, 0, in_gen->GetFitness());
 
   SetBoldColor(COLOR_WHITE);
   Print(in_pos, 8, "%s: ", static_cast<const char*>(in_gen->GetName()));
@@ -58,11 +58,6 @@
 
 void cHistScreen::PrintSpecies(cSpecies * in_species, int in_pos, int max_num)
 {
-  //  SetBoldColor(COLOR_CYAN);
-  //  if (in_gen->GetGestationTime())
-  //    PrintFitness(in_pos, 0, in_gen->GetFitness());
-  //  else Print(in_pos, 0, "    0.0");
-
   SetBoldColor(COLOR_WHITE);
   Print(in_pos, 0, "        sp-%06d: ", in_species->GetID());
 

Modified: development/source/targets/avida-viewer/cOptionsScreen.cc
===================================================================
--- development/source/targets/avida-viewer/cOptionsScreen.cc	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cOptionsScreen.cc	2006-11-22 05:05:08 UTC (rev 1095)
@@ -42,20 +42,20 @@
   Print(2, 0, "Genotype.....:");
   Print(3, 0, "ID #.........:");
 
-  PrintOption(Height() - 4, 2, "[M]ap Screen");
-  PrintOption(Height() - 4, 2, "[S]tats Screen");
+  PrintOption(Height() - 6, 2, "[M]ap Screen");
+  PrintOption(Height() - 5, 2, "[S]tats Screen");
   PrintOption(Height() - 4, 2, "[A]nalyze Screen");
-  PrintOption(Height() - 4, 2, "[Z]oom Screen");
-  PrintOption(Height() - 4, 2, "[H]istogram Screen");
-  PrintOption(Height() - 4, 2, "[E]nvironment Screen");
+  PrintOption(Height() - 3, 2, "[Z]oom Screen");
+  PrintOption(Height() - 2, 2, "[H]istogram Screen");
 
-  PrintOption(Height() - 4, 2, "[O]ptions Screen");
-  PrintOption(Height() - 3, 2, "[B]lank Screen");
-  PrintOption(Height() - 2, 2, "[CTRL-L] Redraw Screen");
-  PrintOption(Height() - 4, 30, "[C]hoose New CPU");
-  PrintOption(Height() - 3, 30, "E[x]tract Creature");
-  PrintOption(Height() - 2, 30, "[W]rite Soup Clone");
+  PrintOption(Height() - 6, 30, "[E]nvironment Screen");
+  PrintOption(Height() - 5, 30, "[O]ptions Screen");
+  PrintOption(Height() - 4, 30, "[B]lank Screen");
+  PrintOption(Height() - 3, 30, "[CTRL-L] Redraw Screen");
+  PrintOption(Height() - 2, 30, "[C]hoose New CPU");
 
+  PrintOption(Height() - 6, 55, "E[x]tract Creature");
+  PrintOption(Height() - 5, 55, "[W]rite Soup Clone");
   if (info.GetPauseLevel()) {
     PrintOption(Height() - 4, 55, "Un-[P]ause");
     PrintOption(Height() - 3, 55, "[N]ext Update");
@@ -65,7 +65,7 @@
   }
 
   SetColor(COLOR_WHITE);
-  Box(0, Height() - 5, Width(), 5);
+  Box(0, Height() - 7, Width(), 7);
 
   SetBoldColor(COLOR_CYAN);
   Print(6, 15, "%dx%d", info.GetPopulation().GetWorldX(),

Modified: development/source/targets/avida-viewer/cScreen.h
===================================================================
--- development/source/targets/avida-viewer/cScreen.h	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cScreen.h	2006-11-22 05:05:08 UTC (rev 1095)
@@ -63,8 +63,7 @@
   cViewInfo& info;
 
   inline void SetSymbolColor(char color);
-  inline void PrintMerit(int in_y, int in_x, cMerit in_merit);
-  inline void PrintFitness(int in_y, int in_x, double in_fitness);
+  inline void PrintDouble(int in_y, int in_x, double in_value);
   inline void PrintOption(int in_y, int in_x, const cString & option);
 
 public:
@@ -132,39 +131,44 @@
   }
 }
 
-inline void cScreen::PrintMerit(int in_y, int in_x, cMerit in_merit)
+inline void cScreen::PrintDouble(int in_y, int in_x, double in_value)
 {
   // if we can print the merit normally, do so.
-  //if (in_merit.GetDouble() < 1000000) {
-    //Print(in_y, in_x, "%7d", in_merit.GetUInt());
-  //}
+  if (in_value == 0.0) {
+    Print(in_y, in_x, "    0.0");
+  }
 
-  // otherwise use scientific notation. (or somesuch)
-  //else {
-    Print(in_y, in_x, "%7.1e", in_merit.GetDouble());
-  //}
-}
+  if (in_value < 10000000.0) {
+    // If this is an integer, print it as such.
+    int int_value = (int) in_value;
+    if (in_value == ((double) int_value)) {
+      Print(in_y, in_x, "%7d", int_value);
+    }
 
-inline void cScreen::PrintFitness(int in_y, int in_x, double in_fitness)
-{
-  // If we can print the fitness, do so!
-  if (in_fitness <= 0.0) {
-    Print(in_y, in_x, " 0.0000");
+    else if (in_value < 10.0) {
+      Print(in_y, in_x, "%1.5f", in_value);
+    }
+    else if (in_value < 100.0) {
+      Print(in_y, in_x, "%2.4f", in_value);
+    }
+    else if (in_value < 1000.0) {
+      Print(in_y, in_x, "%3.3f", in_value);
+    }
+    else if (in_value < 10000.0) {
+      Print(in_y, in_x, "%4.2f", in_value);
+    }
+    else if (in_value < 100000.0) {
+      Print(in_y, in_x, "%5.1f", in_value);
+    }
+    else {
+      Print(in_y, in_x, "%7d", int_value);
+    }
   }
-  else if (in_fitness < 10)
-    Print(in_y, in_x, "%7.4f", in_fitness);
-  //  else if (in_fitness < 100)
-  //    Print(in_y, in_x, "%7.3f", in_fitness);
-  else if (in_fitness < 1000)
-    Print(in_y, in_x, "%7.2f", in_fitness);
-  //  else if (in_fitness < 10000)
-  //    Print(in_y, in_x, "%7.1f", in_fitness);
-  else if (in_fitness < 100000)
-    Print(in_y, in_x, "%7.0f", in_fitness);
 
-  // Otherwise use scientific notations.
-  else
-    Print(in_y, in_x, "%7.1e", in_fitness);
+  // otherwise use scientific notation. (or somesuch)
+  else {
+    Print(in_y, in_x, "%7.1e", in_value);
+  }
 }
 
 

Modified: development/source/targets/avida-viewer/cStatsScreen.cc
===================================================================
--- development/source/targets/avida-viewer/cStatsScreen.cc	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cStatsScreen.cc	2006-11-22 05:05:08 UTC (rev 1095)
@@ -95,10 +95,9 @@
   Print(1, 13, "%7d",   stats.GetNumBirths());
   Print(2, 13, "%7d",   stats.GetBreedTrue());
   Print(3, 13, "%7d",   stats.GetNumParasites());
-  Print(4, 13, "%7.2f", stats.GetEnergy());
-  PrintFitness(5, 13, stats.GetMaxFitness());
-  // Print(5, 13, "%.1e",  stats.GetMaxFitness());
-  Print(6, 13, "%.1e",  stats.GetMaxMerit());
+  PrintDouble(4, 13, stats.GetEnergy());
+  PrintDouble(5, 13, stats.GetMaxFitness());
+  PrintDouble(6, 13, stats.GetMaxMerit());
 
   Print(9,  13, "%5d", stats.GetNumCreatures());
   Print(10, 13, "%5d", stats.GetNumGenotypes());
@@ -111,60 +110,56 @@
 	(best_gen->GetSpecies()->GetID()) : -1);
   Print(5, 37, "%9d", stats.GetUpdate() - best_gen->GetUpdateBorn());
 
-  Print(9,  20, "%.1e", (double) stats.GetTotCreatures());
-  Print(10, 20, "%.1e", (double) stats.GetTotGenotypes());
-  Print(11, 20, "%.1e", (double) stats.GetTotThreshold());
-  Print(12, 20, "%.1e", (double) stats.GetTotSpecies());
+  PrintDouble(9,  20, (double) stats.GetTotCreatures());
+  PrintDouble(10, 20, (double) stats.GetTotGenotypes());
+  PrintDouble(11, 20, (double) stats.GetTotThreshold());
+  PrintDouble(12, 20, (double) stats.GetTotSpecies());
 
-  Print(9,  30, "%6.1f", stats.GetAveCreatureAge());
-  Print(10, 30, "%6.1f", stats.GetAveGenotypeAge());
-  Print(11, 30, "%6.1f", stats.GetAveThresholdAge());
-  Print(12, 30, "%6.1f", stats.GetAveSpeciesAge());
+  PrintDouble(9,  29, stats.GetAveCreatureAge());
+  PrintDouble(10, 29, stats.GetAveGenotypeAge());
+  PrintDouble(11, 29, stats.GetAveThresholdAge());
+  PrintDouble(12, 29, stats.GetAveSpeciesAge());
 
-  Print(9,  39, "%6.2f",
-		     log((double) stats.GetNumCreatures()));
-  Print(10, 39, "%6.2f", stats.GetEntropy());
-  Print(12, 39, "%6.2f", stats.GetSpeciesEntropy());
+  PrintDouble(9,  38, log((double) stats.GetNumCreatures()));
+  PrintDouble(10, 38, stats.GetEntropy());
+  PrintDouble(12, 38, stats.GetSpeciesEntropy());
 
-  PrintFitness(2, 62, best_gen->GetFitness());
-  // Print(2, 62, "%.1e", best_gen->GetFitness());
-  //PrintMerit(3, 62, best_gen->GetMerit());
-  Print(3, 62, "%.1e", best_gen->GetMerit());
-  Print(4, 63, "%6.2f", best_gen->GetGestationTime());
-  Print(5, 63, "%6d", best_gen->GetLength());
-  Print(6, 63, "%6.2f", best_gen->GetCopiedSize());
-  Print(7, 63, "%6.2f", best_gen->GetExecutedSize());
-  Print(8, 63, "%6d", best_gen->GetNumOrganisms());
-  Print(9, 63, "%6d", best_gen->GetThisBirths());
+  PrintDouble(2, 62, best_gen->GetFitness());
+  PrintDouble(3, 62, best_gen->GetMerit());
+  PrintDouble(4, 62, best_gen->GetGestationTime());
+  Print(5, 62, "%7d", best_gen->GetLength());
+  PrintDouble(6, 62, best_gen->GetCopiedSize());
+  PrintDouble(7, 62, best_gen->GetExecutedSize());
+  Print(8, 62, "%7d", best_gen->GetNumOrganisms());
+  Print(9, 62, "%7d", best_gen->GetThisBirths());
   if (stats.GetAveMerit() == 0) {
-    Print(10, 66, "0.0");
+    PrintDouble(10, 62, 0.0);
   } else {
-    Print(10, 63, "%6.3f", ((double) info.GetConfig().AVE_TIME_SLICE.Get()) * best_gen->GetFitness() / stats.GetAveMerit());
+    PrintDouble(10, 62, ((double) info.GetConfig().AVE_TIME_SLICE.Get()) * best_gen->GetFitness() / stats.GetAveMerit());
   }
-  Print(11, 63, "%6d", best_gen->GetDepth());
+  Print(11, 62, "%7d", best_gen->GetDepth());
   // Print(12, 63, "");
 
-  PrintFitness(2, 71, stats.GetAveFitness());
-  Print(3, 71, "%.1e", stats.GetAveMerit());
-  //PrintMerit(3, 72, stats.GetAveMerit());
-  Print(4, 72, "%6.1f", stats.GetAveGestation());
-  Print(5, 72, "%6.1f", stats.GetAveSize());
-  Print(6, 72, "%6.1f", stats.GetAveCopySize());
-  Print(7, 72, "%6.1f", stats.GetAveExeSize());
-  Print(8, 71, "%7.2f",
-		     ((double) stats.GetNumCreatures()) /
-		     ((double) stats.GetNumGenotypes()));
+  PrintDouble(2, 71, stats.GetAveFitness());
+  PrintDouble(3, 71, stats.GetAveMerit());
+  PrintDouble(4, 71, stats.GetAveGestation());
+  PrintDouble(5, 71, stats.GetAveSize());
+  PrintDouble(6, 71, stats.GetAveCopySize());
+  PrintDouble(7, 71, stats.GetAveExeSize());
+  PrintDouble(8, 71,
+	      ((double) stats.GetNumCreatures()) /
+	      ((double) stats.GetNumGenotypes()));
   // @CAO this next line should be get num births, which doesn't exist!
-  Print(9, 70, "%8.3f",
-		     ((double) stats.GetNumDeaths()) /
-		     ((double) stats.GetNumGenotypes()));
+  PrintDouble(9, 71,
+	      ((double) stats.GetNumDeaths()) /
+	      ((double) stats.GetNumGenotypes()));
   if (stats.GetAveMerit() != 0) {
-    Print(10, 71, "%7.3f", ((double) info.GetConfig().AVE_TIME_SLICE.Get()) * stats.GetAveFitness() / stats.GetAveMerit());
+    PrintDouble(10, 71, ((double) info.GetConfig().AVE_TIME_SLICE.Get()) * stats.GetAveFitness() / stats.GetAveMerit());
   } else {
-    Print(10, 71, "%7.3f", 0.0);
+    PrintDouble(10, 71, 0.0);
   }
-  Print(11, 72, "%6.2f", stats.SumGenotypeDepth().Average());
-  Print(12, 72, "%6.2f", stats.SumGeneration().Average());
+  PrintDouble(11, 71, stats.SumGenotypeDepth().Average());
+  PrintDouble(12, 71, stats.SumGeneration().Average());
 
   // This section needs to be changed to work with new task_lib @TCC
   int task_num = task_offset;

Modified: development/source/targets/avida-viewer/cView.cc
===================================================================
--- development/source/targets/avida-viewer/cView.cc	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cView.cc	2006-11-22 05:05:08 UTC (rev 1095)
@@ -339,17 +339,17 @@
   }
 }
 
-void cView::PrintMerit(int in_y, int in_x, cMerit in_merit)
+void cView::PrintMerit(int in_y, int in_x, double in_merit)
 {
   // if we can print the merit normally, do so.
-  //if (in_merit.GetDouble() < 1000000) {
-    //if (cur_screen) cur_screen->Print(in_y, in_x, "%7d", in_merit.GetUInt());
-  //}
+  if (in_merit < 1000000.0) {
+    if (cur_screen) cur_screen->Print(in_y, in_x, "%d", ((int) in_merit));
+  }
 
   // otherwise use scientific notation. (or somesuch)
-  //else {
-    if (cur_screen) cur_screen->Print(in_y, in_x, "%7.1e", in_merit.GetDouble());
-  //}
+  else {
+    if (cur_screen) cur_screen->Print(in_y, in_x, "%7.1e", in_merit);
+  }
 }
 
 void cView::PrintFitness(int in_y, int in_x, double in_fitness)

Modified: development/source/targets/avida-viewer/cView.h
===================================================================
--- development/source/targets/avida-viewer/cView.h	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cView.h	2006-11-22 05:05:08 UTC (rev 1095)
@@ -57,7 +57,7 @@
 
   // Screen helpers
   void ChangeCurScreen(cScreen * new_screen);
-  void PrintMerit(int in_y, int in_x, cMerit in_merit);
+  void PrintMerit(int in_y, int in_x, double in_merit);
   void PrintFitness(int in_y, int in_x, double in_fitness);
 
   // Map navigation

Modified: development/source/targets/avida-viewer/cZoomScreen.cc
===================================================================
--- development/source/targets/avida-viewer/cZoomScreen.cc	2006-11-21 22:03:01 UTC (rev 1094)
+++ development/source/targets/avida-viewer/cZoomScreen.cc	2006-11-22 05:05:08 UTC (rev 1095)
@@ -62,31 +62,19 @@
   // Draw the options block which is on all screens.
   
   SetBoldColor(COLOR_WHITE);
-  Print(OPTIONS_Y, OPTIONS_X, "[<]                [>]");
+  PrintOption(OPTIONS_Y, OPTIONS_X, "[<]                [>]");
   if (info.GetPauseLevel()) {
-    Print(OPTIONS_Y+2, OPTIONS_X+2, "Un-[P]ause");
-    Print(OPTIONS_Y+3, OPTIONS_X+2, "[N]ext Update");
-    Print(OPTIONS_Y+4, OPTIONS_X+2, "[Space] Next Inst");
+    PrintOption(OPTIONS_Y+2, OPTIONS_X+2, "Un-[P]ause");
+    PrintOption(OPTIONS_Y+3, OPTIONS_X+2, "[N]ext Update");
+    PrintOption(OPTIONS_Y+4, OPTIONS_X+2, "[Space] Next Inst");
   } else {
-    Print(OPTIONS_Y+2, OPTIONS_X+2, "[P]ause   ");
+    PrintOption(OPTIONS_Y+2, OPTIONS_X+2, "[P]ause   ");
     Print(OPTIONS_Y+3, OPTIONS_X+2, "             ");
     Print(OPTIONS_Y+4, OPTIONS_X+2, "                 ");
   }
   
-  SetBoldColor(COLOR_CYAN);
-  Print(OPTIONS_Y, OPTIONS_X+1, "<");
-  Print(OPTIONS_Y, OPTIONS_X+20, ">");
-  if (info.GetPauseLevel()) {
-    Print(OPTIONS_Y+2, OPTIONS_X+6, "P");
-    Print(OPTIONS_Y+3, OPTIONS_X+3, "N");
-    //Print(OPTIONS_Y+4, OPTIONS_X+3, "Space");
-  } else {
-    Print(OPTIONS_Y+2, OPTIONS_X+3, "P");
-  }
-  
   // Redirect to the proper Draw() method.
-  
-  if (mode == ZOOM_MODE_CPU)
+    if (mode == ZOOM_MODE_CPU)
   {
     if(info.GetConfig().HARDWARE_TYPE.Get() == HARDWARE_TYPE_CPU_ORIGINAL) 
       DrawCPU_Original();
@@ -173,10 +161,7 @@
   
   if (task_num < info.GetWorld().GetNumTasks() || task_offset != 0) {
     SetBoldColor(COLOR_WHITE);
-    Print(Height()-1, Width() - 23, " [<-] More [->] ");
-    SetBoldColor(COLOR_CYAN);
-    Print(Height()-1, Width() - 21, "<-");
-    Print(Height()-1, Width() - 11, "->");
+    PrintOption(Height()-1, Width() - 23, " [<-] More [->] ");
   }
 }
 
@@ -206,10 +191,7 @@
   // HLine(MINI_MAP_Y + 2, MINI_MAP_X, 19);
   
   SetBoldColor(COLOR_WHITE);
-  Print(MINI_MAP_Y + 11, MINI_MAP_X,  "[-]           [+]");
-  SetBoldColor(COLOR_CYAN);
-  Print(MINI_MAP_Y + 11, MINI_MAP_X + 1,  '-');
-  Print(MINI_MAP_Y + 11, MINI_MAP_X + 15, '+');
+  PrintOption(MINI_MAP_Y + 11, MINI_MAP_X,  "[-]           [+]");
   SetColor(COLOR_WHITE);
   
   // --== Memory ==--
@@ -226,30 +208,19 @@
   Print(OPTIONS_Y, OPTIONS_X+4,    "Component Zoom");
   SetBoldColor(COLOR_WHITE);
   
-  Print(OPTIONS_Y+6, OPTIONS_X+2, "[E]dit Component");
-  Print(OPTIONS_Y+7, OPTIONS_X+2, "[V]iew Component");
+  PrintOption(OPTIONS_Y+6, OPTIONS_X+2, "[E]dit Component");
+  PrintOption(OPTIONS_Y+7, OPTIONS_X+2, "[V]iew Component");
   if(info.GetConfig().MAX_CPU_THREADS.Get() >1)
-    Print(OPTIONS_Y+8, OPTIONS_X+2, "Next [T]hread");
-  Print(OPTIONS_Y+9, OPTIONS_X+2, "[TAB] Shift Active");
+    PrintOption(OPTIONS_Y+8, OPTIONS_X+2, "Next [T]hread");
+  PrintOption(OPTIONS_Y+9, OPTIONS_X+2, "[TAB] Shift Active");
   
   if (info.GetPauseLevel()) {
-    Print(OPTIONS_Y+10, OPTIONS_X+2, "[Arrows] Scroll");
+    PrintOption(OPTIONS_Y+10, OPTIONS_X+2, "[Arrows] Scroll");
   } else {
     Print(OPTIONS_Y+10, OPTIONS_X+2, "               ");
   }
   
   
-  SetBoldColor(COLOR_CYAN);
-  Print(OPTIONS_Y+6, OPTIONS_X+3, "E");
-  Print(OPTIONS_Y+7, OPTIONS_X+3, "V");
-  if(info.GetConfig().MAX_CPU_THREADS.Get() >1)
-    Print(OPTIONS_Y+8, OPTIONS_X+8, "T");
-  Print(OPTIONS_Y+9, OPTIONS_X+3, "TAB");
-  
-  if (info.GetPauseLevel()) {
-    Print(OPTIONS_Y+10, OPTIONS_X+3, "Arrows");
-  }
-  
   // Highlight the active section...
   SetActiveSection(active_section);
   
@@ -456,10 +427,10 @@
   
   const cMerit cur_merit(phenotype.GetCurBonus());
   
-  PrintFitness(5, 14, phenotype.GetFitness());
+  PrintDouble(5, 14, phenotype.GetFitness());
   Print(6, 15, "%6d ", phenotype.GetGestationTime());
-  PrintMerit(7, 14, phenotype.GetMerit());
-  PrintMerit(8, 14, cur_merit);
+  PrintDouble(7, 14, phenotype.GetMerit().GetDouble());
+  PrintDouble(8, 14, cur_merit.GetDouble());
   Print(9, 15, "%6d ", genotype ? genotype->GetLength() : 0);
   Print(10, 15, "%6d ", hardware.GetMemory().GetSize());
   
@@ -972,13 +943,13 @@
     cGenotype& genotype = *(info.GetActiveGenotype());
     Print(5, 12, "%9d", genotype.GetNumOrganisms());
     Print(6, 12, "%9d", genotype.GetLength());
-    Print(7, 12, "%9d", genotype.GetCopiedSize());
-    Print(8, 12, "%9d", genotype.GetExecutedSize());
+    PrintDouble(7, 14, genotype.GetCopiedSize());
+    PrintDouble(8, 14, genotype.GetExecutedSize());
     
-    PrintFitness(10, 14, genotype.GetFitness());
-    Print(11, 12, "%9f", genotype.GetGestationTime());
-    Print(12, 14, "%9f", genotype.GetMerit());
-    Print(13, 12, "%9f", genotype.GetReproRate());
+    PrintDouble(10, 14, genotype.GetFitness());
+    PrintDouble(11, 14, genotype.GetGestationTime());
+    PrintDouble(12, 14, genotype.GetMerit());
+    PrintDouble(13, 14, genotype.GetReproRate());
     
     // Column 2
     Print(1, 40, "%9d", genotype.GetUpdateBorn());




More information about the Avida-cvs mailing list