game-programming-patterns icon indicating copy to clipboard operation
game-programming-patterns copied to clipboard

Subclass Sandbox Suggestion

Open matthewPapageorge opened this issue 2 years ago • 0 comments

In the Design Decisions subsection under "How does the base class get the state that it needs", it is suggested to use two stage initialization. It would be beneficial to point out that one need not create a factory method for each subclass. One could simply create a single template function returning a SuperPower*, enabling you to have a single function to create every SuperPower.

matthewPapageorge avatar Oct 31 '23 14:10 matthewPapageorge