Coding question: formats and predicates
This post is mostly for Max but others are welcome to chime in too...
I want to expand the possibilities of GameFormatQuest by allowing the inclusion of cubes in the format specification for extra flexiblity, to make it possible to make individual cards available in a Quest World when desired. While cubes wouldn't produce boosters (at least in the first version of the code), you could find cube-based cards in the shop or receive them as rare rewards.
However, I'm facing a slight technical difficulty. Since GameFormatQuest is now extending GameFormat, it does not contain any filter/predicated definitions anymore. So it seems that I would need to:
1) Add (partly redundant) filter code to the GameFormatQuest class and override the superclass (GameFormat). The problem: I don't think this would be practical without overriding a lot of other stuff as well, like the private predicates filterRules and filterPrinted. At which point one might wonder what's the point of extending the GameFormat class in the first place.
or
2) Add the whole cube stuff to the superclass GameFormat. This would be bad! The stuff I want to add would affect Quest mode only, I don't want to mess with the fundamental GameFormat class.
Is there a third, better option?
I want to expand the possibilities of GameFormatQuest by allowing the inclusion of cubes in the format specification for extra flexiblity, to make it possible to make individual cards available in a Quest World when desired. While cubes wouldn't produce boosters (at least in the first version of the code), you could find cube-based cards in the shop or receive them as rare rewards.
However, I'm facing a slight technical difficulty. Since GameFormatQuest is now extending GameFormat, it does not contain any filter/predicated definitions anymore. So it seems that I would need to:
1) Add (partly redundant) filter code to the GameFormatQuest class and override the superclass (GameFormat). The problem: I don't think this would be practical without overriding a lot of other stuff as well, like the private predicates filterRules and filterPrinted. At which point one might wonder what's the point of extending the GameFormat class in the first place.
or
2) Add the whole cube stuff to the superclass GameFormat. This would be bad! The stuff I want to add would affect Quest mode only, I don't want to mess with the fundamental GameFormat class.
Is there a third, better option?