Very simple poker hand evaluation program
- Download the project
git clone [email protected]:sizief/poker.git
-
Go to poker project directory (
cd poker
) -
Run interactive shell
iex -S mix
- Pass the poker hand to the program and see the result!
Poker.run("Alice 2C 3H 4S 8C 6H", "Bob 2S 2H 4H 8C 6S") #=> {"Bob", "one pair"}
Poker.run("Alice 2C 3H 4S 8C 6H", "Bob 2S 3C 4H 8H 6S") #=> {"tie"}
Poker.run("Alice 2C 3H 4S 8C 6H", "Bob 2S 3C 4H 8H 9S") #=> {"Bob", "High card: 9"}
- Add input validation