From: Mark S. <mar...@gm...> - 2008-11-08 15:59:24
|
Why I see these singletons as effectively global variables is because the way you have it set up, where you can call (for example) the GameManager.getInstance () static routine from anywhere in the code base, allows for the GameManager class to be accessed and manipulated from anywhere. There is no true "encapsulation" enforced. The getInstance method allows any code to muck around with stuff it shouldn't know or care about. Mark |