Poker coding challenge from Thinkific.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
hands
spec
.rspec
Gemfile
Gemfile.lock
README.md
card.rb
game.rb
helpers.rb
player.rb
test.rb

README.md

Poker Hand Showdown

Implement a library (in your language of choice) which evaluates who are the winner(s) among several 5 card poker hands.

Note for this project that you only need to implement a subset of the regular poker hands:

  • Flush
  • Three of a Kind
  • One pair
  • High Card

Input

  • Collection of players in the showdown.
  • Player Name
  • 5 Cards (each specifying the card rank and suit of the card)

Output

Collection of winning players (more than one in case of a tie)

Example

Input

Joe, 3H, 4H, 5H, 6H, 8H

Bob, 3C, 3D, 3S, 8C, 10D

Sally, AC, 10C, 5C, 2S, 2C

Output

Joe