0
\$\begingroup\$

What would you call the groups of cards in a card game, including both piles (draw, discard...) and hands?

I'm coding a generic card game engine and I've been unable to find a good name for the base class from which Pile and Hand would inherit. I've temporarily named it Group but it's way too vague.

Ideas: CardGroup, CardSet, Position, Stack...

\$\endgroup\$
1
  • 4
    \$\begingroup\$ There are just two hard problems in computer science: Cache invalidation and naming things. \$\endgroup\$
    – Philipp
    Commented May 31, 2023 at 8:59

2 Answers 2

2
\$\begingroup\$

In Magic the Gathering, the different places that cards or other objects can exist in are called zones. Your hand is a zone, your deck is a zone, your discard pile is a zone, etc. Zones have different characteristics defining whether they are publicly or privately visible, which player can access them, and whether the card order matters. This may or may not be a good level of abstraction as it doesn't really refer to the groups of cards themselves but rather the places those groups exist, as some zones can contain things other than cards.

\$\endgroup\$
1
  • \$\begingroup\$ That's a great suggestion. Thanks. \$\endgroup\$ Commented Jun 4, 2023 at 10:27
3
\$\begingroup\$

When I did this a couple years ago, I called them all "piles", and a hand (fan) was just a special subcategory of pile that could hover off-table and have private visibility to one player.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .