From aa5c31be6ec6a688e8d3a66c770ba99be8e060c9 Mon Sep 17 00:00:00 2001 From: tom Date: Sun, 12 Feb 2017 05:59:12 -0600 Subject: -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 --- src/dna.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/dna.cpp (limited to 'src/dna.cpp') 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; +} -- cgit v1.2.3