A
Arne Vajhøj
On 12/17/2012 1:28 PM, Lew wrote:
[snip]
If you hard-code certain assumptions, e.g., that there are 52 cards in the deck,
your program will be unable to model many games.
I would argue that a deck is always 52 cards, but that some
games use more than one deck.
Some games do not use all of the deck; some include one or more
jokers. See the section "Modified Deck" in
http://boardgamegeek.com/wiki/page/Standard_Deck_Playing_Card_Games
for several examples.
Jokers has already been discussed.
I would not change the definition of deck because some
games does not use all cards in a deck.
public interface Game {
...
public List<Card> cardsUsed();
}
Arne