HTML5 Deck of Cards
21–30 of 165 posts
Re: HTML5 Deck of Cards
#22I suppose that's more for a second library that can manage stacks of cards, dealing and interacting with dealt cards, etc.
Re: HTML5 Deck of Cards
#23Maybe it's a weird takeaway, but this line is really clever: var suit = i / 13 | 0; That's such a clean way to get a 0, 1, 2 or 3 from each card's `i` and I never would have thought of it.
Re: HTML5 Deck of Cards
#24Any idea why the suits all render as smiley faces in Chrome/Mac? Inspecting the cards, you can see that they are using the unicode character for spade/heart/etc. But in the browser itself you get nothing but smileys. Perhaps the font they're using doesn't have those code points? Edit: Yes, that's the case. Font is not specified, so it comes in as "inherit" by default, using whatever the browser feels like. On Mac Chr…
Font should be Open Sans.. I have Chrome/Mac and it's working :/
Seems kinda wasteful.
Re: HTML5 Deck of Cards
#25More like JS + CSS3 Deck of Cards.
I used HTML5 just because the original version was made with Flash back in 2006 ( http://pakastin.fi/cards_2006 ). Then I made a Angular.js version, which is lost, but was featured on Chrome Experiments. This is actually HTML5 Deck of Cards 2 :)
Re: HTML5 Deck of Cards
#26Meh, it's all shiny and no functionality: I can't play any games or hook this up to anything. And it's not even that shiny: it would be quite difficult in casual play to differentiate cards at a glance: there are no faces on face cards, etc. I implemented the same functionality (minus drag/drop, which isn't actually useful) a few times myself when I was working on poker bots.
Re: HTML5 Deck of Cards
#27I thought we needed to make a separate repository for github pages first. My other repo doesn't show at all.
Re: HTML5 Deck of Cards
#28How did you get it to show up at the URL: http://pakastin.github.io/deck-of-cards/ ? I thought we needed to make a separate repository for github pages first. My other repo doesn't show at all.
Re: HTML5 Deck of Cards
#29How did you get it to show up at the URL: http://pakastin.github.io/deck-of-cards/ ? I thought we needed to make a separate repository for github pages first. My other repo doesn't show at all.