Monday, December 3, 2007  OSGi Services for Dynamic Applications
(IV)  Or: use OSGi to write a dueling card game - part 4 In the
previous postings I created the basics of a dueling card game
using OSGi services. In this last posting of this series I'm
going to add some special spell cards. Finally I'll use the
capabilities of OSGi to dynamically add a bundle with new cards
to the ongoing games without having to interrupt them.  Adding
Spell Cards Spells make the game really interesting as they can
influence the game beyond the standard rules. They can do things
like change the power of a monster, inflict damage on a player
or another card or generally change the game state. Sometimes
spells can behave like monsters or monsters can have additional
spell-like behaviour too. My SpellDeck bundle adds a number of
them, each of which has special abilities and a special
implementation.  In my Activator, I'm registering my spell cards
(5 of each): public class Activator implements BundleActivator {
  public void star