how do other rules engines handle overriding core rules?
Well, I asked for this forum, so I should start it off.
I was wondering how people handle special abilities that override core game rules? In python it's pretty easy, since everything is an object. I basically use a variant of Aspect Oriented Programming (see wikipedia's page http://en.wikipedia.org/wiki/Aspect-ori ... rogramming for a completely obtuse description), where the card will basically inject new code into the part of the rules code that it affects. When the card is removed from play, it removes the code it injected. The nice part about this is the core rules engine follows the comp rules and is completely oblivious to possible changes by cards.
How about you? What do programs like Deckbot (C++) and Firemox (Java) do?
I was wondering how people handle special abilities that override core game rules? In python it's pretty easy, since everything is an object. I basically use a variant of Aspect Oriented Programming (see wikipedia's page http://en.wikipedia.org/wiki/Aspect-ori ... rogramming for a completely obtuse description), where the card will basically inject new code into the part of the rules code that it affects. When the card is removed from play, it removes the code it injected. The nice part about this is the core rules engine follows the comp rules and is completely oblivious to possible changes by cards.
How about you? What do programs like Deckbot (C++) and Firemox (Java) do?