[Avida-SVN] r2862 - branches/hjg-dev/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Tue Oct 21 13:01:27 PDT 2008


Author: hjg
Date: 2008-10-21 16:01:26 -0400 (Tue, 21 Oct 2008)
New Revision: 2862

Modified:
   branches/hjg-dev/source/main/cTaskLib.cc
Log:


Modified: branches/hjg-dev/source/main/cTaskLib.cc
===================================================================
--- branches/hjg-dev/source/main/cTaskLib.cc	2008-10-21 19:57:21 UTC (rev 2861)
+++ branches/hjg-dev/source/main/cTaskLib.cc	2008-10-21 20:01:26 UTC (rev 2862)
@@ -3091,7 +3091,15 @@
 }
 
 
+/* This task rewards an organism some for its own raw materials. */
+double cTaskLib::Task_ControlUseRawMaterials(cTaskContext& ctx) const {
+	double bonus = 0.0;
+	// reward for own stuff
+	bonus += ctx.GetOrganism()->GetSelfRawMaterials(); 
+	return bonus;
+}
 
+
 /* This task just checks that an organism has raw materials and that it has 
 	received a donation of raw materials from another organism. Specifically, 
 	the task rewards in proportion to the number of organisms that have




More information about the Avida-cvs mailing list