How can I retrieve X and Y coordinates from a user within one function?(For java game needing coordinates for array)
"The getX function will ask the user for an X coordinate. It will return the number once entered by the user. getY has the same function, the message is adjusted to ask for the Y coordinate."
This is what I need to follow by for the function. The return values need to be used to place a number in a 2D Array. How do I achieve this in one function?
board[x][y] = 1;
EDIT: I can only do some much within java (for computing test, so marks won't be awarded for using anything out of what we have been taught - AQA AS Level). I need to scan inputs from the user in the function and return both coordinates to be used by the 2D array in main.
Please tell me if I am being confusing or I am not making sense and I'll try and explain better.
If there is no way to do it this way, just tell me. JimiiBee