It doesn't. Nothing does. Good poker players should have no problem doing all this in their heads. The tooling which does help is hand analysis and replay. I haven't kept up, but there used to be tools while playing online poker which would track your play and the play of your opponents. Then I believe there were databases where you could upload that information so that you could study the play of regular opponents. Most helpful was looking at your own play though.
I doubt it’s supposed to, it’s to calculate who wins when writing your own poker implementation. I am not the author, but calculating the winner is non trivial.
Okay fair it’s more than 50 lines, I guess my definition of non-trivial is something you can’t quickly think of a design for. I’ll try it later and see if there’s some gotchas I can’t think of :)
I had the same initial reaction as the other person. Should be easy right? I think you’re right though, there are probably many more steps to getting this right than it seems on the surface.
I kind of want to take your 50 line challenge however :) I always loved playing poker, might be a fun exercise.