OOP Part 3: Composition
Last time, we looked at the inheritance style of object-oriented programming in detail. Now let’s look at the alternative: composition. We’ll use another example from Icefall to illustrate the differences. Icefall has a central ‘world view’ that shows the player and their immediate surroundings (items, monsters, terrain, etc). The world view also shows animations (e.g.