i was wondering how the most efficient way would be in terms of generating x instances of possession whose price is higher than 50? i think i used a rather inefficient way so if anyone could give me a pointer i would highly appreciate. this is how i went about it:
i basically just copied the static method randomPossession. within the .h file
and within the .m file the only thing i changed was the part where the value was calculated:
int randomValue = rand() % (100 - value + 1) + value;
while the outcome did work all the copy/paste just doesn’t seem very efficient to say at least. so what would have been better?
thanks a lot