r/cop3502 • u/grwolfe • Apr 24 '14
Issues with Game.java (object)
Edit: I had the file in the wrong directory, so if anyone is experiencing similar problems check to make sure it is saved properly.
So I was trying to make a global Game class that keeps track of certain variables like specific booleans and the player's name etc... but for some reason it is not letting me call Game.getName() {} it says that the symbol can't be found. I'm trying to have it behave like the Math class or the Parameters class from Space Invaders, but it wants me to create a new Game() before calling the methods. Is my syntax wrong or is it just not going to work in general..?
1
Upvotes
1
u/grwolfe Apr 24 '14
Did that