[Avida-SVN] r2909 - branches/hjg-dev/source/cpu
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Sat Nov 1 12:55:16 PDT 2008
Author: hjg
Date: 2008-11-01 15:55:15 -0400 (Sat, 01 Nov 2008)
New Revision: 2909
Modified:
branches/hjg-dev/source/cpu/cHardwareCPU.cc
Log:
new rep without standing
Modified: branches/hjg-dev/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/hjg-dev/source/cpu/cHardwareCPU.cc 2008-10-31 19:16:17 UTC (rev 2908)
+++ branches/hjg-dev/source/cpu/cHardwareCPU.cc 2008-11-01 19:55:15 UTC (rev 2909)
@@ -6776,9 +6776,8 @@
// update reputation to include this donation.
// get the current reputation; increment by 1.
+ // includes a concept of standing
if (m_world->GetConfig().AUTO_REPUTATION.Get() == 1) {
- // set rep to 1, since the organism donated
-// organism->SetReputation(1);
int my_rep = organism->GetReputation();
organism->SetReputation(my_rep +1);
// get neighbor reputation
@@ -6799,6 +6798,10 @@
int rep = neighbor->GetReputation();
// if the organism has not yet donated, put it into bad standing
if (rep == 0) neighbor->SetReputation(-1);
+ } else if (m_world->GetConfig().AUTO_REPUTATION.Get() == 4) {
+ // Similar to 1, except does not include standing.
+ int my_rep = organism->GetReputation();
+ organism->SetReputation(my_rep +1);
}
More information about the Avida-cvs
mailing list