/poker_refactor

[ruby, quick, refactor, morning exercise]

Primary LanguageRuby

Poker

I've written a bunch of ugly code that makes the test pass. Your job will be to refactor the code.

Individual cards are described as a string with a combination of two characters:

  • The first represents the value : A,2,3,4,5,6,7,8,9,T,J,Q,K
  • The second represends the suit: s,h,d,c

Remember the principles of good software design

  • DRY
  • Naming
  • Test
  • Small

Other things to consider

  • Formatting & Indentation
  • Readability
  • Consistency
  • Encapsulation where appropriate

Running the code

gem install rspec

cd into the directory

cd starter

Run it.

rspec

Poker Hands

https://www.fgbradleys.com/images/poker_hands.gif