It varies by state, but home poker games often aren't expressly illegal. The illegal aspect is often profiting off of running the poker game. As long as you don't implement a rake into the system and you are paying out the entire pot, you are probably good from a legal perspective although IANAL.
When I played poker at MSFT in WA state, another rule was that you couldn't bet truly blind. You had to at least look at your cards. To see your cards and bet was a 'game of skill', to not was 'gambling'.
No, that's not how poker is played, it really is about counting odds and evaluating the possible plays. Unless you were kidding of course and I'm far to sleepy again.
This is the case in California, which will cover many of the people that would use this. As long as there is no rake, the game is legal. If you'd like to see the law in your state, see:
The title confused me for a minute. In IRC chat circles, "bot" means a persistent software entity running in the channel, performing some task. In online poker circles, "bot" means software that automatically plays for you.
The attention to detail in spec output is exemplary.
Uploading to Imgur for displaying card images to users seems like a strange choice, though. Why not have the bot serve its own images up over HTTP and attach URLs to itself? I could even imagine a badges.io style image preparation microservice that could be shared by several playing-card based bot apps.
Possibly because running a bot client is much different from running a webserver. Dialing outbound to connect to slack is much easier than figuring out or configuring your own canonical URL, opening ports, etc.
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
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.
Clearly the author is able to watch imgurl access logs... (or does imgurl list number of views for images? With good enough timing, that might be enough...)... ;-)
The [imgur](https://github.com/kaimallea/node-imgur) API lets you upload an image (anonymously) and responds with a URL. I promisify'd that and the result is super straightforward. You don't even need to auth.
Am I correct in saying that the shuffle algorithm is flawed? It looks to me like it swaps each card iteratively with a random card in the deck. This means that some cards are likely shuffled more times that others, and some sequences are then more common than others.
For those interested, here is the reasoning from a combinatorics perspective. There are 52! different arrangements of a deck of cards. To see this, note that in any arrangement there are 52 locations for the Ace of Spades, once that choice is made there are 51 locations for the next card to end up in and so on until the last card must go in the only open location. Hence there are 52 factorial arrangements of cards in to a deck.
Shuffling, by swapping each card with any of the 52 other spots produces 52^52 (i.e. 52 * 52 * 52 * ...) arrangements. How can this be when there are only 52! (i.e. 52 * 51 * 50 * ...) possible arrangements. The answer is than many of the arrangements generated by this shuffling technique end up with the cards in the same order. This follows from the pigeon-hole theorem since 52^52 > 52!
Furthermore, we know that 52^52 is not a multiple of 52! (to see this realize that, for example, 11 divides 52! but not 52^52). Therefore, some bad shuffle generated arrangements will occur more than others and, consequently, that bad shuffle algorithm does not produce a "fair" shuffle.
Just a way better interface on it. Searchable history, multiple rooms inside rooms effectively. File sharing, lots of niceties that are probably possible in IRC but would take a lot of work. It has changed the way our team communicates, for me I am the only remote guy on a team of 6ish devs. I can pick and choose my hours, work when other guys are off, and still see all the comms that happened while I wasn't at my machine.
Right. Think of Slack as a really well configured IRC server, except you don't have to manage it at all, and it's front-end UI is much more modern (and better); integrated file uploading, inline media, integrations with everything under the sun, etc. None of it is impossible in IRC, it's just _easier_ in Slack because it's out of the box like that.
And, most importantly: I don't have to manage the damned server ;)
There are a couple of protocols that do similar things, but nearly all of them have a major fatal flaw, that is unfortunately very difficult to work around through no fault of their own: mobile push notifications, especially on iOS. An open protocol is useful, but not enough, and that's where Slack hosting and developing everything themselves has an advantage, despite open protocols and tools being what I'd normally want to use. But practicality matters, and so when I last looked at alternatives a year ago, I couldn't find anything that would be a drop-in feature-complete replacement. It's a shame, but I expect something to come up in the future, perhaps on Matrix or other protocols.
True, and I use a bouncer myself, but it's something you have to set up explicitly - Slack already does it for you. Notifications as well - you can get emails, or texts, or the app on your phone can ping you.
And sure, a bouncer with some plugins could do it, but you'd have to set it all up. I've had "have bouncer email me when I'm mentioned in a channel" as a mental to-do for the past five years, and it's never been a high-enough priority for me to sit down and expend the minimum of two hours it would take (and likely much more.)
I love everything about Slack except the damn chat window. Oh, and the pricing. The onboarding process is buttery smooth, and there are tons of integrations. But there's so little in the way of communication density (even in 'compact mode') that I miss IRC.
We have a jira integration set up and every ticket consumes five lines plus plenty of whitespace - a few of those and there's no real comms visible on the page. Every integration I've see consumes gobs of space. Similarly, flagging announcements by assigning a colour is almost worthless - the colour bar isn't very visible (I prefer hipchat's method, where the entire chatline gets the background colour set). Then there's the problem of people's actual chat messages being the least visible thing on the page - smaller and less noticable than names, integration notifications, what have you. But the onboarding is so easy, it just sucks users up.
Being able to see a conversation instead of bells and whistles? I miss that... but plain text scares regular users...
I hear those complaints, we found them early on too. We have since separated operational noise in to other channels that ONLY contain integration related stuff, and try to keep one channel purely for actual chatter.
why not use a generic chatbot like errbot (http://errbot.net [shameless plug alert]) and get all the backends (hipchat, IRC, XMPP etc...) for free ?
there are existing poker AIs in python to integrate with: https://github.com/mikaelbr/AI-Poker-Player
Tried it - it crashed for both games we tried. Then again, installing node on my box was a mess - we have some sort of proxy on apt-get that insisted on installing an old version. I probably screwed up somehow.
The Heroku deploy does appear to work, but I was hoping to get it all running locally. Thanks though! It looks like there's a ticket on the lwip project on github that is similar to my issue, so hopefully they'll resolve that soon enough :)
Make sure you have node and npm installed on your machine. (You can check by running "npm -v" from the command line, if you don't see anything, then take a quick google search on how to install it).
Run "npm install" in the folder directory where the package.json is visible. In this case, if you cloned or extracted this project, it would be in the slack-poker-bot folder.