GrapeSodaGames / Multiplayer

0 stars 0 forks source link

Need a more elegant way to reach the Game node #133

Closed zaphodb2002 closed 3 months ago

zaphodb2002 commented 4 months ago

So the other modules have a static reference because they are Autoloads. But when I need access to the game, I have to manually get the reference.

Some thoughts: This could be referenced in a GSGModule node, that we could then derive the other module heads from that. Probably the easiest way to do it, but not the cleanest.

Otherwise, it could be restructured so that Game references the other modules and nothing references Game directly. This seems backward, though, because game is the one module that is always guaranteed to exist. Maybe we can invert the dependency and create an intermediate service class.

zaphodb2002 commented 3 months ago

Since the changes in #142, this is now unnecessary. Everything is handled by GameState now.