Special Deck Function Needed

Assume a Deck of N cards, one of which Card X is special.

In order to prepare this deck for play, Card X is separated from the rest of the deck, which is then shuffled. The top six cards are then drawn off and shuffled with Card X. This group of 7 cards is then placed on the bottom of the deck. The deck is then set in its place on the board, ready for play.

Ideally, I would like this series of actions to occur in the background (i.e., no direct manipulation of the cards), tied to a single multiple action button located on the main map.

I’ve tried some solutions, come close, but no joy. Most likely I am missing something and someone with more knowledge can tell me how I should construct this. Hopefully my near-misses are not indicative of a bug and/or lacuna in JAVA for Macintosh and/or VASSAL itself (I have been building the mod in Beta 4).

Advice would be appreciated, but especially a working model of a solution into which I can plug my own card definitions would be great.

Thanks,

Mac

Off the top of my head, you need 2 decks. We’ll call them A and B

All of the cards except for card X go into deck A. Turn always shuffle on for deck A. Deck B shuffles via right click and assign a reshuffle key to it. Setup a series of GKC that moves 6 cards to deck B, then a return to deck B for card X, then fire off the reshuffle of deck B and then move remainder of deck A to deck B. A dummy piece can hold all the necessary triggers and be invoked from a button or other key trigger.

Thanks for the response! Actually, I tried something like this, but kept getting unexpected, undesirable results. I suspect everything, including my programming, but most of all Apple’s slightly behind the pace implementation of JAVA (responsible for a number of VASSAL issues on the Mac).

I will continue fiddling (and swearing!), hopefully some further responses might shed more light on the problem.

Mac

Thus spake “miyazakigrognard”:

What issues on the Mac? Please describe these.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I suspect this is largely due to the complexity of the task. What kind of effects are you seeing?

  • M.

Post generated using Mail2Forum (mail2forum.com)

Think you are right Mike.
The task is doable, its how the sequence is being put together that is the problem. A step is being missed in the sequence of traits or the traits aren’t ordered correctly etc…
Would have to see it to fix it though

Tim

From: messages-bounces@forums.vassalengine.org [mailto:messages-bounces@forums.vassalengine.org] On Behalf Of Michael Kiefte
Sent: Thursday, December 11, 2008 6:25 PM
To: VASSAL Engine Forums Mailing List
Subject: Re: [Module Design]Re: Special Deck Function Needed

I suspect this is largely due to the complexity of the task. What kind of effects are you seeing?

  • M.

Post generated using Mail2Forum (mail2forum.com)

I did not intend this thread become a place to outline general Mac problems (I have submitted bug reports via the software’s mechanism for this).

As to the problem at hand, what I have been attempting is obviously all wrong, and I think showing my work so far is going to serve no purpose. What I require - what I hope someone of better knowledge will deign to provide - is a ground-up solution framework for the series of tasks I described in my initial post. Let’s choose some specific parameters:

Assume a standard pack of playing cards with the face cards removed (so 4 each of cards numbered 1 thru 10). Disregard suits.

Assume one Joker.

The 40 cards will be shuffled, six drawn off the top and shuffled with the Joker. Finally, the remaining 34 numbered cards are placed atop the specially shuffled 7, and the deck is set ready for play (assume there is a empty “Draw Pile” deck defined as part of the main map which is the ultimate destination.

I would like this tied to one multi-action button on the main map, so that players need not directly manipulate the collation process. In fact, I don’t see a need even for players to be able to access the constituent decks, since only the shuffled, collated resultant deck impacts play. So, if it is possible to make the process invisible, that would be optimal.

Thanks,

Mac