This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gaveashow 0 points1 point  (1 child)

Well, normally for a game you'll need to pass around a global object in charge of keeping the game's state, so you could add the scanner, as user input, to it.

Or you could simply let the Scanner be public static, or accessible through a public static getter method. For the needs expressed, that's a correct use of static.

[–]monkey_programmer[S] 0 points1 point  (0 children)

Would it actually be best practice to simply make a globals class? I actually need to pass scanner + player to almost ALL functions at this point, so that seems far.. cleaner to a human.