Let's say I have a builder class (which by the way is not techinically a builder, but it's not a factory either) to generate different rules for a game:public class RuleBuilder {    private Game game;    public RuleBuilder(Game g) {        game = g;    }    public Rule scoreRule() {        return new ScoreRule(game);    }    public Rule playerRule() {        return new PlayerRule(game);    }    // etc...}The builder returns instances of subclasses of the Rule class.If we wanted a third party to define their own rules and add them to the game, what should I change in the design to adapt to this new need?
Redesigning a builder to make it reusable
java;design;design patterns;object oriented