I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?
If not, is there a way to systematically access these from web images?
I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?
If not, is there a way to systematically access these from web images?
You can get some nice vector playing cards from this site, licensed under GNU LGPL (read more here). Download this folder to your computer and then try the following:
(* replace with your download dir *)
files = Flatten@With[{dir = "~/Downloads/Chrome/mma/SVG_and_EPS_Vector_Playing_Cards_Version_1.3/EPS_Vector_Playing_Cards_Version_1.3/52-Individual-Vector-Playing-Cards-1.2_(EPS-Format)/"},
FileNames["*.eps", dir, 2]];
Clear@CardData
SetAttributes[CardData, Listable]
StringCases[Last@FileNameSplit@#, card__ ~~ ".eps" :>
(CardData[card] = ImageCrop@Import@#)] & /@ files;
You can then use this like any other curated data:
GraphicsRow[CardData@{"2C", "KH", "AS", "QD", "JC"}]

You can extend this further and also create a random hand generator using Mathematica as follows:
deck = Flatten@With[
{
ranks = CharacterRange["2", "9"] ~Join~ {"10", "J", "Q", "K", "A"},
suits = {"C", "S", "H", "D"}
},
Outer[StringJoin, ranks, suits]
];
dealHand[n_Integer] /; 1 ≤ n ≤ 52 := CardData@RandomSample[deck, n]
Use this to deal a hand as dealHand[5], for instance. You'll have to modify this a bit to deal randomly and exhaust the deck at the same time (as you would in a game). There was a question on this previously on this site and I gave an answer based on Internal`Bag[] that will be useful here (along with some of the other answers there).
Not super high quality, but this might do for some purposes:
cards = Join[
Table[ToString[k], {k, 2, 10}],
{"Jack", "Queen", "King", "Ace"}];
suits = {"hearts", "diamonds", "clubs", "spades"};
deck = Flatten[Outer[#2 <> " of " <> #1 &, suits, cards]];
images = Table[
WolframAlpha[card, {{"Image", 1}, "Content"}], {card, deck}];
Grid[Partition[images, 13]]

In terms of your real question, namely "how to find out what all is included as curated data", I had no clue if playing card images were included or not. I simply asked Wolfram Alpha via a query like so:

Choosing "Subpod content" as shown, I learned that the command to access the image is
WolframAlpha["4 of clubs", {{"Image", 1}, "Content"}]
I couldn't figure out how to access the whole deck at once, but from here I was able to put the whole thing together programmatically.
WolframAlpha server?
– VF1
Dec 11 '12 at 18:54
I don't know if this question is specifically asking about finding images in MMA's data, but if the end goal is to get playing card images, then using an online image and partition seems to work great. Link to image
ImagePartition[
Import["http://www.milefoot.com/math/discrete/counting/images/cards.png"],{73, 98}] // Grid
Edit: The lack of a top outline over the third row of cards is an artifact of the pdf I saved the image as, not the actual MMA output. Also, the slightly thicker right side outline is a property of the image, which is supposed to have a shadow. This can be removed programmatically if needed.
Finally, I suppose that the way I went about extracting the individual card images from the imported image could have been more elegant than what I did, but I don't think there's an issue with trial and error for finding the card dimensions if it's just as effective as whatever the more elegant code is.
//Grid, then it will become a 2-dimensional array of playing card images. The Grid was there for display purposes. Mark's answer does more directly address what you asked for, though. I just think mine looks cooler.
– VF1
Dec 11 '12 at 18:55
It is not entirely clear to me whether the playing cards in your question are just an example of what you want to find or the actual target. Since the other answers already provide you with the latter I'll provide a way to explore ExampleData.
The following two lines of code will build a complete overview of what's hidden in there. Running it may take a bit of time as most of the data will have to be transfered from the Wolfram server to your local paclet store for the first time.
switchedDisplay[stuff_] :=
DynamicModule[{x=False},
Row[{"Show: ", Checkbox[Dynamic[x]], " ",
Dynamic[If[x, ExampleData@stuff, stuff], SynchronousUpdating -> False]}]
]
TabView[# -> TabView[switchedDisplay /@ ExampleData[#]] & /@ ExampleData[]]

MacOs doesn't seem to like long TabViews, so the code may have to be changed a little bit.
This adds another layer of TabViews where necessary:
MacMax = 30;
TabView[# ->
TabView[If[Length@ExampleData[#] > MacMax,
TabView /@ Partition[switchedDisplay /@ ExampleData[#], MacMax],
switchedDisplay /@ ExampleData[#]]] & /@ ExampleData[]]
MacOS user MarkMcClure reports that ControlPlacement -> {Top, Left} in TabView also prevents problems from occurring.
Did you see Mathematica Package for Texas Hold'em from Sal Mangano. It's a Poker Simulation Library in Mathematica from http://www.mathematicacookbook.com. The code covers parsing cards, monte carlo simulation, a game engine as well as visual interface with cards. You can access also the images of cards from this link of same library.
In versions 11.3+, you can use Jon McLoone's ResourceFunction["PlayingCardGraphic"]
playingcardgraphic = ResourceFunction["PlayingCardGraphic"];
SeedRandom[777]
playingcardgraphic[RandomSample[Range @ 52, 5]]
Multicolumn[playingcardgraphic /@ Range[52], 13,
Appearance -> "Horizontal", Spacings -> {0, 0}]
ExampleData. I hunted but could not find playing cards and thought someone might know if/where they might be hiding before trying to manually construct such a thing. – JohnD Dec 11 '12 at 18:27