CPSC-312-2021/Poker Probability Calculator

From UBC Wiki

What is the problem?

The Poker Calculator calculates the probability of a hand rank (royal flush, two of a kind, straight etc.) and the odds of winning a game. This probability is approximated by running or simulating the set of all possible hands. It will calculate likely each set of hole cards can be made into a poker hand (a set of cards you have in your hand).

What is the something extra?

The user will be able to input what cards are in their hands and input what cards are on the table using an I/O interaction. This information will then be merge and calculated to stimulate the probability of having a certain hand ranking as well as the chances of winning a game.

What did we learn from doing this?

What is the bottom-line? Is functional programming suitable for (part-of) the task?

Link to code

https://github.com/jillianchiam/CPSC312-Prolog-Project