Reflections on Using the Observer Pattern

I’m not sure I entirely grasp how to implement the observer pattern in my project as of yet, but I want virtually everything (except for the locations) to have the ability to interact amongst each other. My simulation, as previously noted, will be based around Godzilla rampaging through several locales in which he will be able to destroy inanimate objects such as buildings, trees, and boats and engage in battle with animates such as military, battleships, tanks, and Mothra. In each scenario there will need to be communication between objects about their position relative to each other. Godzilla in-particular will need to be updated with the status of these objects as each of them will be able to be destroyed/killed which should be Godzilla’s queue to move on. Conversely these objects will need to be updated when they are being attacked by Godzilla so that they know to fight back, die, or run away.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s