diff options
author | majortom6 <tombarrett@siu.edu> | 2017-03-05 13:13:44 -0600 |
---|---|---|
committer | Tom Barrett <tombarrett@siu.edu> | 2017-03-07 13:23:42 -0600 |
commit | 8f5a73f1daba39c8b0175036cf688f8ce1399a8f (patch) | |
tree | 1bd365c1eb41d1b6f19ccac747919b2b762b72c0 /inc | |
parent | dfda3f2a5e555d3173359134f4994bcd12d129f8 (diff) |
-added carnivores
-removed creature type constant and replaced it with herbavore/carnivore type
-replaced resource type with plant type
-added eatType to dna (whatever the organism goes for hunger)
Diffstat (limited to 'inc')
-rw-r--r-- | inc/constants.hpp | 14 | ||||
-rw-r--r-- | inc/dna.hpp | 1 | ||||
-rw-r--r-- | inc/list.hpp | 1 |
3 files changed, 10 insertions, 6 deletions
diff --git a/inc/constants.hpp b/inc/constants.hpp index e7d69b4..49b7678 100644 --- a/inc/constants.hpp +++ b/inc/constants.hpp @@ -2,15 +2,17 @@ #define constants_h // General -const int CREATURES = 100; -const int RESOURCES = 1000; -const int MINIMUM_RESOURCES = 5000; +const int HERBAVORES = 100; +const int CARNIVORES = 50;; +const int PLANTS = 5000; +const int MINIMUM_PLANTS = 4000; const int WINDOW_X = 1000; const int WINDOW_Y = 1000; // Types -const int CREATURE_TYPE = 1; -const int RESOURCE_TYPE = 2; +const int PLANT_TYPE = 1; +const int HERBAVORE_TYPE = 2; +const int CARNIVORE_TYPE = 3; // Creatures const int CREATURE_MAX_HEALTH = 1000; @@ -19,9 +21,9 @@ const int CREATURE_BITE = 10; const int CREATURE_EXP_PREG_TIME = 100; const int CREATURE_EXP_AGE = 10000; const float CREATURE_SPEED = .1; +const float CREATURE_REACH = .1; const float CREATURE_MUTATION_PERCENT = .25; const float CREATURE_MUTATION_CHANCE = .05; -const float CREATURE_REACH = .1; // Resource const int RESOURCE_MAX_HEALTH = 200; diff --git a/inc/dna.hpp b/inc/dna.hpp index 1126638..01f373b 100644 --- a/inc/dna.hpp +++ b/inc/dna.hpp @@ -15,6 +15,7 @@ class DNA DNA combine(DNA D); int type; + int eatType; int maxHealth; int bestSense; int bite; diff --git a/inc/list.hpp b/inc/list.hpp index b5da34c..f43ba07 100644 --- a/inc/list.hpp +++ b/inc/list.hpp @@ -12,6 +12,7 @@ class List { public: List(); + void Behavior(); void Place(); void Remove(); |