Singletons and you
 Posted: 23 Oct 2012, 19:19
Posted: 23 Oct 2012, 19:19Hey guys, 
Please, don't write those ugly Singeltons.getModel.getGameState in your added code if there already is local variable holding that game or a class member with reference to current game you can use.
And whenever there are more than 2-3 references to Singeltons.getModel.getGameState in a single method, consider declaring a variable to hold the value you are fetching from singletons so many times.
			Please, don't write those ugly Singeltons.getModel.getGameState in your added code if there already is local variable holding that game or a class member with reference to current game you can use.
And whenever there are more than 2-3 references to Singeltons.getModel.getGameState in a single method, consider declaring a variable to hold the value you are fetching from singletons so many times.