[Newbies] Where do I put it?
Blake
blake at kingdomrpg.com
Mon Mar 5 08:37:31 UTC 2007
> Just some quick thoughts. In the real world a deck of cards is just
> that. There is no meaning in the cards themselves. Instead the meanings
> are in
> the rule book that comes with the game that you are playing. Also there
> is no value in a card, but in the hand, or best hand out of possible
> hands in the cards that you are dealt.
Precisely. That's why nothing is in the deck or card to say that (e.g.) a
Jack is worth "10" or that an ace is "high".
> Does that help?
Well, it's nice to know my overall thinking is right (for the value of
"right" comprised of "Ron agrees with me"<s>). Maybe I can phrase the
question more clearly now.
The identity of an inidivual card is its symbol (or symbol set).
In a standard deck, you have a rank and suit, like "Ace" and "Spades".
In a tarot deck, you'd have the same, and also the trumps, like "The Fool"
and "The Hanged Man".
In a Magic deck, you'd have the name, the type, the mana cost, the
strength, the defense, the special rules and the "color" text.
So, we have these symbols--#Ace, #TheFool, #Plains--and my design has them
defined as part of the deck class.
The symbols have to be defined at the game level, for sure. The game needs
to be able to evalulate hands, as you point out. I suppose they don't
really need to be defined at the deck or card level, except in such a way
that a particular card or group of cards can be identified. (So if, for
example, I'm playing Go Fish, I have to be able to identify that a player
has a Queen, and also to be able to lay down all my Queens when I have
four.)
At the same point, below the game and above the deck, there would seem to
be some value in having the symbols available. A standard deck, or
variants composed of just those cards, is used for thousands of games.
Poker, solitaire, bridge, war, go fish, crazy eights, etc., all use the
same deck. Some remove cards, like pinochle, some use multiple decks so
that it's harder to "cheat" (like blackjack).
Now, maybe I'm wrong on this and it should be regarded as a concidence
that War, Poker and Bridge all use the same cards, since the cards don't
have the same meanings. A particular user interface object could still
treat the cards as the same.
So, maybe that's the answer: They aren't really the same cards in the
context of a program, so they should be made at the game level.
More information about the Beginners
mailing list