Implements pellet-spawning.