for(int x = 0; x < 100; x = x + 2)
{
if(x % 4) cout << x;
}
for(int x = 0; x < 100; x = x + 2)
{
if(x % 4 == 0) continue;
cout << x;
}
for(int x = 2; x <= 100; x += 4)
{
cout << x;
}
for (auto obj = Organisms.begin(); obj != Organisms.end(); obj++)
{
(*obj)->eat();
}
Organisms.erase(
std::remove_if(Organisms.begin(), Organisms.end(),
[](organism_ptr obj){obj->is_eaten();}
),
Organisms.end()
);
organisms_t new_organisms;
for (auto obj = Organisms.begin(); obj != Organisms.end(); obj++)
{
organism_ptr org = (*obj)->reproduce();
if (org)
new_organisms.push_back(org);
}
Organisms.insert(Organisms.end(), new_organisms.begin(), new_organisms.end())
for (auto obj = Organisms.begin(); obj != Organisms.end(); obj++)
{
(*obj)->move();
}