+
+ c.Mass(c.GetProperties().birth_mass);
+ c.Density(mass / volume);
+ c.GetSteering().MaxAcceleration(1.4);
+ c.GetSteering().MaxSpeed(4.4);
+ c.AddGoal(std::unique_ptr<Goal>(new IdleGoal(c)));
+}
+
+
+void Split(Creature &c) {
+ Creature *a = new Creature(c.GetSimulation());
+ const Situation &s = c.GetSituation();
+ // TODO: generate names
+ a->Name("Blobby");
+ // TODO: mutate
+ c.GetGenome().Configure(*a);
+ s.GetPlanet().AddCreature(a);
+ // TODO: duplicate situation somehow
+ a->GetSituation().SetPlanetSurface(
+ s.GetPlanet(), s.Surface(),
+ s.Position() + glm::dvec3(0.0, a->Size() * 0.51, 0.0));
+ a->BuildVAO();
+
+ Creature *b = new Creature(c.GetSimulation());
+ b->Name("Sir Blobalot");
+ c.GetGenome().Configure(*b);
+ s.GetPlanet().AddCreature(b);
+ b->GetSituation().SetPlanetSurface(
+ s.GetPlanet(), s.Surface(),
+ s.Position() + glm::dvec3(0.0, b->Size() * -0.51, 0.0));
+ b->BuildVAO();
+
+ c.Die();