FAQ
Q) We learned about polymorphism, but I didn't notice anything polymorphic in the game code so far.
A) We will see polymorphism in action in the following chapter, when we write a function that takes a PlayableCharacter
as a parameter. We will see how we can pass either Bob or Thomas to this new function and it will work the same with either of them.
Get Beginning C++ Game Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.