Java: Resetting all values in the program -
I am working on this program where at the end of the game I want to play the user again. If they say yes, I have to start a new game. I did a resume () method:
public zero restart (game g = new game); G.playGame (); } However, when I call this method, some values in my program remain intact during the last game.
And make a new example of the game with all the default values?
Without more information, I think that your problem is that you use the stable variable That values will continue in all instances of a given class. If you make them all in member variables and start them in their constructor, then this work should be done.
Comments
Post a Comment