Bug/Error with card deck

The module has two decks. Each deck also has a discard deck associated with it. Cards are drawn from a draw deck to its associated discard deck. When the draw deck is empty, it sends a hotkey to send all the discards back to the draw deck. Cards drawn are reported in the chat window.

Sometimes this works fine. However, sometimes after a pass through the deck, when the discards have been sent back, the cards can still be drawn from the draw deck, but only the very first card drawn will be shown face up in the discards. The module will report other cards being drawn, and the draw deck appears to deplete as if everything was working, but only the image from the first card drawn will be shown in the discards.

Typically one deck will always display this behavior after the first pass through the draw deck. The second deck will eventually display this behavior as well, with enough passes through the deck (but no more than 2-3).

Running 3.1.15, on Mac OS X.

Do you have a very simple example module you can post?

  • M.

On Wednesday, 15 December 2010, mycenae ed@crucible.cc wrote:

[This message has been edited.]

The module has two decks. Each deck also has a discard deck associated
with it. Cards are drawn from a draw deck to its associated discard
deck. When the draw deck is empty, it sends a hotkey to send all the
discards back to the draw deck. Cards drawn are reported in the chat
window.

Sometimes this works fine. However, sometimes after a pass through the
deck, when the discards have been sent back, the cards can still be
drawn from the draw deck, but only the very first card drawn will be
shown face up in the discards. The module will report other cards being
drawn, and the draw deck appears to deplete as if everything was
working, but only the image from the first card drawn will be shown in
the discards.

Typically one deck will always display this behavior after the first
pass through the draw deck. The second deck will eventually display this
behavior as well, with enough passes through the deck (but no more than
2-3).

Running 3.1.15, on Mac OS X.


Read this topic online here:
Bug/Error with card deck


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages


Michael Kiefte, Ph.D.
Associate Professor
School of Human Communication Disorders
Dalhousie University
Halifax, Nova Scotia, Canada
tel: +1 902 494 5150
fax: +1 902 494 5151

It’s actually the Monopoly module, which I am currently revising for version 2.0.

You should be able to reproduce the error by drawing cards from either deck until each is empty. The Community Chest cards always throw an error when the main deck is depleted, it’s harder to reproduce with the Chance deck.

Inconsistently, the module sometimes returns an ‘uncaught exception error’ when you get through the draw decks. But even if this error is not returned, you will eventually get the issue where the top card is shown but no others.

It’s posted to mediafire.com/?1cr5qv2exfcro

I think I’ve found the problem. When you draw the last card from the draw
pile, you’re sending the card to the discard pile which at the same time
that the discard pile is being sent back to the draw deck. The internal
state of the game becomes inconsistent.

You shouldn’t send the discard pile back to the draw deck as soon as it’s
empty for two reasons: a) the player will never see the card he/she drew (or
worse, it exists in two places simultaneously because of the inconsistency)
and b) the card the player drew is actually in the draw pile because it
emitted a hot key to return the cards back to the draw pile.

You should force the players to return the discards back to the draw pile
before a card is drawn. That way, they’ll actually be able to see what card
is on top of the discard before it gets reshuffled, and you’ll solve the
inconsistency.

Also you have two actions assigned to the return to deck hot key. You only
need one.

  • M.

On 16 December 2010 13:22, mycenae ed@crucible.cc wrote:

It’s actually the Monopoly module, which I am currently revising for
version 2.0.
You should be able to reproduce the error by drawing cards from either
deck until each is empty. The Community Chest cards always throw an
error when the main deck is depleted, it’s harder to reproduce with the
Chance deck.

Inconsistently, the module sometimes returns an ‘uncaught exception
error’ when you get through the draw decks. But even if this error is
not returned, you will eventually get the issue where the top card is
shown but no others.

It’s posted to mediafire.com/?1cr5qv2exfcro[1]

[1] mediafire.com/?1cr5qv2exfcro

Thanks for your help with this, Michael. I’ve simply removed the auto-return feature that was causing the problem. The players will need to do this manually.