diff --git a/eo/tutorial/Templates/mutation.tmpl b/eo/tutorial/Templates/mutation.tmpl index 2b66be2c..befbcea9 100644 --- a/eo/tutorial/Templates/mutation.tmpl +++ b/eo/tutorial/Templates/mutation.tmpl @@ -46,15 +46,16 @@ public: */ bool operator()(GenotypeT & _genotype) { + bool isModified; // START code for mutation of the _genotype object /** Requirement - * if _genotype has been modified - * return true; - * otherwise - * return false; + * if (_genotype has been modified) + * isModified = true; + * else + * isModified = false; */ - + return isModified; // END code for mutation of the _genotype object } diff --git a/eo/tutorial/Templates/quadCrossover.tmpl b/eo/tutorial/Templates/quadCrossover.tmpl index 35554312..13145004 100644 --- a/eo/tutorial/Templates/quadCrossover.tmpl +++ b/eo/tutorial/Templates/quadCrossover.tmpl @@ -48,15 +48,16 @@ public: */ bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2) { + bool oneAtLeastIsModified; // START code for crossover of _genotype1 and _genotype2 objects /** Requirement - * if at least one genotype has been modified - no way to distinguish - * return true; - * otherwise - * return false; + * if (at least one genotype has been modified) // no way to distinguish + * oneAtLeastIsModified = true; + * else + * oneAtLeastIsModified = false; */ - + return oneAtLeastIsModified; // END code for crossover of _genotype1 and _genotype2 objects }