// // Created by jovian on 18/08/17. // #include "PeopleExpGrowth.h" PeopleExpGrowth::PeopleExpGrowth(int delay, int divisor) : PlanetStep(delay), m_divisor(divisor) { } void PeopleExpGrowth::apply(PlanetDef &def) { if (def.stock.get(PEOPLE) > 0) { def.stock.add(PEOPLE, def.stock.get(PEOPLE) / m_divisor); def.stock.add(PEOPLE, 1); } }