Hello all.  I need to modify the behavior of the standard deck and I need
some help.  I'm trying to accomplish two things.

First, I'd like to override the way Deck paints itself so that it appears
flat (similar to a stack having stacking options with zeros set).
Second, I'd like to expose 3 map-level properties (similar to the
"<deck>_numPieces" property) for each of the three types of cards in the
deck.

I'm confident these goals can best be accomplished by subclassing the deck
class, but what I need is a good shove in the right direction.  Some
questions in my mind are:
  Has someone else already done something very similar?
  Do I need a specific verion of the JDK for doing this?
  Do I need to checkout all the sourcecode, or do I simply need the JAR
files from the VASSAL distribution?
  Is there some place that has documentation about the various VASSAL
classes and their interaction, or does it only exist in javadoc?
  Exactly how do I add and reference my own classes within a module?
  What's the implication of creating my own decks, particularly with what
needs to happen when VASSAL is updated?

For goal number 1 it looks like a simple modification to this line in the
draw method:
-  int count = Math.min(getPieceCount(), 10);
+  int count = Math.min(getPieceCount(), 1);

For goal number 2 it looks like I need to add some code to both the
fireNumCardsProperty and setContents methods.

Can someone out there help me?

Cheers

-Tim

Reply via email to