Modifying an existing design pattern to fit different use cases

Patterns are not commandments received from a higher plane. They have their origins in, and have been refined from, real-world engineering projects. Patterns can be modified to fit new situations better.

In this recipe, we'll see how to modify the factory pattern to make creating missions easier.

Get ECMAScript Cookbook 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.