23
2
Input
None
Output
52 cards. No duplicates. Cards are represented as their unicode characters, e.g. .
The Unicode codepoints follow the following format:
- The first three digits are
1F0
. - The next digit is
A
,B
,C
, orD
for spades, hearts, diamonds, and clubs respectively. - The next digit is
1
throughC
andE
for the various numbers/face cards.1
is ace,2
-A
are the number cards, andB
,D
, andE
are the jack, queen, and king respectively. (C
is the knight, which isn't in most decks.)
Example output:
Rules:
- This is code-golf. Shortest answer wins.
- Forbidden loopholes are forbidden.
- Your deck must be actually randomized. If run 20 times, 20 random (and most likely unique) outputs must be generated.
Note
If you only see boxes, install the DejaVu fonts.
Let us continue this discussion in chat.
– NoOneIsHere – 2017-06-04T21:36:24.9302Can there be spaces between each character? – totallyhuman – 2017-06-04T22:14:57.573
3I think you mean it should be random and that all permutations should have a none zero probability of occurrence. – Notts90 supports Monica – 2017-06-04T22:39:49.330
4Who else is seeing a bunch of boxes? – SuperJedi224 – 2017-06-05T01:00:09.260
@SuperJedi224 Read the bottom section – dkudriavtsev – 2017-06-05T01:01:05.103
1@Mendeleev you should also post a warning that that download is almost a gigabyte! – Noodle9 – 2017-06-05T03:52:08.010
1@Noodle9 That's only if you download the CJK fonts. All the other ones should be less than 50M total, and you should only need Sans, Serif, and Mono anyway. – dkudriavtsev – 2017-06-05T04:30:31.243
The example output is showing as just 52 boxes for me. – Magic Octopus Urn – 2017-06-05T17:40:13.017
@carusocomputing Please read the bottom section of the challenge – dkudriavtsev – 2017-06-05T18:16:29.783
2If you only see boxes, install Google's Noto fonts. Yeah, I can't do that on my phone... – Dennis – 2017-06-06T13:37:49.010
From which of the linked fonts are these cards? I've installed all of them (except for NotoColorEmoji.ttf, which gives an error), but I still see boxes.. – Kevin Cruijssen – 2017-06-07T08:55:12.107
Noto Emoji contains one playing card (U+1F0CF PLAYING CARD BLACK JOKER), and it doesn't even appear in your challenge! – Dennis – 2017-06-08T16:28:42.120
Ooooops... I linked the wrong fonts! – dkudriavtsev – 2017-06-08T16:45:19.997
@Dennis Should be fixed now – dkudriavtsev – 2017-06-08T16:45:38.680
1@KevinCruijssen Should be fixed now – dkudriavtsev – 2017-06-08T16:45:50.683
@SuperJedi224 Try installing the newly linked fonts – dkudriavtsev – 2017-06-08T16:46:59.227
Can confirm, DejaVu Sans is what my desktop computer uses by default and indeed has the playing cards. – Dennis – 2017-06-08T16:49:23.720
@carusocomputing I've updated the font section, try again – dkudriavtsev – 2017-06-09T00:09:12.520
Is the Knight used in any set of cards? Google searches seem to suggest tarot cards? – mbomb007 – 2018-01-16T15:38:56.113