Lesson 9
No Object is an Island
Chapter 2: Object interaction
Battle game!
In the last lesson, we have slowly introduced the whole concept of object-oriented programming (OOP) and why it makes your code more readable and easier to understand.
We will start this lesson with a short video I’ve prepared, just to remind you about the awesomeness of OOP.
Towards the end of the video, I would like you to take note of how hero
and enemy
interacted with each other in the object-oriented version of the code. This will serve as the basis of this lesson!
Enjoy my silly little battle game in the video! ⚔️