diff options
author | tom <tombarrett@siu.edu> | 2017-02-12 05:59:12 -0600 |
---|---|---|
committer | tom <tombarrett@siu.edu> | 2017-02-12 05:59:12 -0600 |
commit | aa5c31be6ec6a688e8d3a66c770ba99be8e060c9 (patch) | |
tree | 702a7154031cb9c96d0e7fd495868418433bb842 /src/dna.cpp | |
parent | 60b53e09cca0bdb4cddff76457e990ee33c42b2f (diff) |
-minor constant changes
-implemented dna structure, which carries the creatures attributes suchas speed and reach
-currently a child inherits 100% the same dna as the mother
-removed sing namespace std
Diffstat (limited to 'src/dna.cpp')
-rw-r--r-- | src/dna.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dna.cpp b/src/dna.cpp new file mode 100644 index 0000000..36eda3d --- /dev/null +++ b/src/dna.cpp @@ -0,0 +1,14 @@ +#include "dna.hpp" + +Dna::Dna() +{ + maxHealth = CREATURE_MAX_HEALTH; + speed = CREATURE_SPEED; + reach = CREATURE_REACH; + bestSense = CREATURE_BEST_SENSE; + bite = CREATURE_BITE; + amountToGrow = CREATURE_AMOUNT_TO_GROW; + expectedPregnancyTime = CREATURE_EXP_PREG_TIME; + expectedAge = CREATURE_EXP_AGE; + sizeMax = CREATURE_SIZE_MAX; +} |