Re:Slack Poker Bot
by TazeTSchnitzel on Tuesday September 01, 2015 @09:11PM
(#10156891)
Are images even necessary, anyway?
Unicode has playing card codepoints (the full 52) and playing card house codepoints (️, ️, ️, ️).
Edit: What the hell? Hacker News stripped the Unicode characters?! https://news.ycombinator.com/item?id=10156894
Re:Slack Poker Bot
by CharlieHess on Tuesday September 01, 2015 @10:08PM
(#10157051)
You can't control the font rendering in Slack (it's Lato, at a certain size). The Unicode cards are far too small to read.
Re:Slack Poker Bot
by TazeTSchnitzel on Tuesday September 01, 2015 @11:21PM
(#10157251)
I did think of that. But you could use the symbols for the houses and pair them with a number/letter.
Re:Slack Poker Bot
by CharlieHess on Tuesday September 01, 2015 @04:57PM
(#10155680)
The Slack API only allows a single image URL for attachments. I was also keen on the idea of being able to swap out the card assets whenever. Unicode playing cards is a decent idea, except Slack only renders in Lato.
Re:Slack Poker Bot
by icebraining on Tuesday September 01, 2015 @06:18PM
(#10156182)
Does Slack accept images with data URIs instead of URLs? Seems like it'd give you the best of both worlds.
> preparing hands as a single image seems a bad way of doing this
I don't believe there's another way to display them inline?I saw it on HN a while ago- a webservice that does poker hands using a URL; you could pass it cards in the URL and it would display them.
On the other hand, preparing hands as a single image seems a bad way of doing this; Does the slack API only allow a single image per conversation? I agree with your preparation microservice idea - There should be (and probably are several) a service that allows you to specify a poker hand as a query string and get back an image of the hand. More simply, though: A webfont and https://en.wikipedia.org/wiki/Playing_cards_in_Unicode