This is an archived version of the course. Please find the latest version of the course on the main webpage.

Chapter 2: Object interaction

Battle game!

face Josiah Wang

In the last lesson, I introduced the concept of object-oriented programming (OOP) and discussed why OOP can make your code more readable and easier to understand.

I will start this lesson with a short video, just to remind you of 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! ⚔️