@@ -493,7 +493,7 @@ other ways our codebase can get access to an object:
493493
494494 ^code 11
495495
496- With this, only ` World ` is globally available. Functions can get to the
496+ With this, only ` Game ` is globally available. Functions can get to the
497497 other systems <span name =" demeter " >through</span > it:
498498
499499 ^code 12
@@ -505,20 +505,20 @@ other ways our codebase can get access to an object:
505505
506506 </aside >
507507
508- If, later, the architecture is changed to support multiple ` World ` instances
508+ If, later, the architecture is changed to support multiple ` Game ` instances
509509 (perhaps for streaming or testing purposes), ` Log ` , ` FileSystem ` , and
510510 ` AudioPlayer ` are all unaffected -- they won't even know the difference. The
511- downside with this, of course, is that more code ends up coupled to ` World `
511+ downside with this, of course, is that more code ends up coupled to ` Game `
512512 itself. If a class just needs to play sound, our example still requires it
513513 to know about the world in order to get to the audio player.
514514
515- We solve this with a hybrid solution. Code that already knows about World
515+ We solve this with a hybrid solution. Code that already knows about ` Game `
516516 can simply access ` AudioPlayer ` directly from it. For code that doesn't, we
517517 provide access to ` AudioPlayer ` using one of the other options described
518518 here.
519519
520520 * ** Get it from a Service Locator.** So far, we're assuming the global class
521- is some regular concrete class like ` World ` . Another option is to define a
521+ is some regular concrete class like ` Game ` . Another option is to define a
522522 class whose sole reason for being is to give global access to objects. This
523523 common pattern is called a <a class="pattern"
524524 href="service-locator.html">Service Locator</a > and gets its own chapter.
0 commit comments