- def exit(self, gamestate):
- turnip_data = [turnip.serialize() for turnip in self._turnips]
- gamestate.turnips = turnip_data
- # TODO: Move this into the end_night function
- gamestate.days += 1
- self._mould.update_resistances(gamestate)
+ def grow_turnips(self, gamestate):
+ """ Turnips grow at the end of the night """
+ for turnip in self._turnips[:]:
+ # Turnips grow at dawn
+ seeds = turnip.grow()
+ if seeds:
+ gamestate.seeds += seeds
+ gamestate.harvested += 1
+ self._turnips.remove(turnip)
+ # We ignore the body cleanup, since the space is going away