Pure JavaScript poker hand analyzer UPDATE: fixing Ace Straight and commeting the code

Did you enjoy the pure JavaScript poker hand analyzer to be used (also) in puzzle games I posted earlier this week? Unfortunately there was a glitch causing the function to detect Ace Straight not to work properly.

I fixed it, and to give you some extra value I commented the source code so you can learn how it’s done.

This is the fixed result of the script:

And this is the commented source code:

You can download the source code, and next week I’ll show you an example of this engine in action.

  • Anon

    Royal flushes?