To play it is best to use the normal Version without a canvas. There first player one deals. And hides them. The same goes for player two. After both players have their cards, they can talk an bet. To hold a card click on it and then Change Cards to exchange them.
To reveal the winner use the who won? - button.
The top player is called Player1 and the bottom Player is Player2.
For all Pairs/Triple, the one with the highest Pair wins. If both have the same pair, the game it defaults to draw.
For all other cases the high card rule is used as tie breaker.
This program was created during a course at the ULL. The original task can be found in p13_poker.md
For all classes there are unit tests. They can be found in the test folder. To execute them use npm run test
. That runs the tests and creates a coverage report.
For the documentation use npm jsdoc
.
The deployed version can be found here: https://troppes.github.io/javascript-poker/