I am really stuck and would like some advice. If I am to make a custom function that interacts with an item..
Is it better to code two functions,
With just one parameter (String item) that will get a random x and y positions of the item and click
With three variables (String item, int x, int y) if I want to to click in a specific position
or just having one function which is the second one, and if I pass -1,-1 it generates a random position of the item rectangle.
I know that both ways will work but imagine a function with 100 lines, then another with 100 or just 1 function with 100 and an extra check for the parameters.
So how is such thing done in programming properly?