I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

Talk:Playing cards

From Rosetta Code

clarification ?[edit]

I would appreciate a little clarification:

Deal what? (A hand? Cards face up? If a hand, how many hands? How many cards?)

'Print the contents of the deck'. Does this mean the cards that are still left (not yet dealt out) ?   -- Gerard Schildberger 03:01, 21 January 2011 (UTC)

The examples on the page seem to "deal" one card -- that is, remove one card from the deck and return it. You are right about printing the contents of the deck. In the future if you are confused about a task like this you should try to figure out what the existing examples do. If the examples do different things then note it on the talk page. If the examples follow a pattern then copy that pattern for your example and change the task description if you think it is unclear. Be careful, though. Sometimes adding too many minor details gets away from the spirit of the task. --Mwn3d 04:14, 21 January 2011 (UTC)
I wasn't confused (from observing the other programming solutions),   but the wording in the task left some things unsaid.   I don't know what you meant by removing one card from the deck and   return it.   Return it to a discard pile?   I don't like to interpret other program's output to see what should be done, after all, their (the others) output could be wrong or incomplete, one programmer propagating their interpretation from another's output.   I feel the task's preamble should adequately explain what is desired/expected for the output, and also explain how (in this case) dealing cards.   Not all card games deal one card at a time (or even face down);   most Germain derived card games   [euchre, 500   (not 500 rummy), pinochle, schmier (smear), schafkopf or schafskopf (sheepshead), skat, ···]   the cards are dealt three at a time, otherwise it's a misdeal, and the next player   (the youngest hand)   is now the new dealer   (dealing is considered advantages in most German card games).     -- Gerard Schildberger (talk) 14:25, 16 October 2019 (UTC)

Rust example[edit]

The Rust example I've written appears to be unneedlessly (if that is a word) verbose. A large part of the code is taken up by the functions that print out the card names. Any ideas on how I could improve it? Wei2912 (talk) 17:39, 8 June 2014 (UTC)