X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcreature%2Fgoal.cpp;h=f20ecc5b2b3d2cd99c96ad2a6685286a1b27691c;hb=631f0cfd6b421f5be68d60375db2ce91176d923d;hp=5f9f1e839d9ed24bdff82c62caaf7ea50bd2b42d;hpb=a1b5d6dbc13d185b9ac459e421ae44b3ef8ce133;p=blobs.git diff --git a/src/creature/goal.cpp b/src/creature/goal.cpp index 5f9f1e8..f20ecc5 100644 --- a/src/creature/goal.cpp +++ b/src/creature/goal.cpp @@ -6,7 +6,7 @@ #include "Creature.hpp" #include "../app/Assets.hpp" -#include "../ui/String.hpp" +#include "../ui/string.hpp" #include "../world/Planet.hpp" #include "../world/Resource.hpp" #include "../world/Simulation.hpp" @@ -100,8 +100,7 @@ void BlobBackgroundTask::CheckStats() { void BlobBackgroundTask::CheckSplit() { if (GetCreature().Mass() > GetCreature().OffspringMass() * 2.0 && GetCreature().OffspringChance() > Assets().random.UNorm()) { - std::cout << "[" << ui::TimeString(GetCreature().GetSimulation().Time()) - << "] " << GetCreature().Name() << " split" << std::endl; + GetCreature().GetSimulation().Log() << GetCreature().Name() << " split" << std::endl; Split(GetCreature()); return; } @@ -111,7 +110,7 @@ void BlobBackgroundTask::CheckMutate() { // check for random property mutation if (GetCreature().MutateChance() > Assets().random.UNorm()) { double amount = 1.0 + (Assets().random.SNorm() * 0.05); - math::Distribution &d = GetCreature().GetGenome().properties.props[(int(Assets().random.UNorm() * 8.0) % 8)]; + math::Distribution &d = GetCreature().GetGenome().properties.props[Assets().random.UInt(9)]; if (Assets().random.UNorm() < 0.5) { d.Mean(d.Mean() * amount); } else {