README.md in cards_lib-0.2.0 vs README.md in cards_lib-0.2.1
- old
+ new
@@ -72,9 +72,36 @@
* In **lib/cards_lib/standard/rules/poker_rule.rb** there are some working Poker hand verification methods.
* In **lib/cards_lib/standard/evaluators/blackjack_evaluator.rb** there is a Blackjack hand worth evaluation tool. See the **test/standard/evaluators/blackjack_evaluator_test.rb** for examples.
+##Definitions
+
+The main difference between **Rules** and **Evaluators** is Rules are purposed
+for exact precedence and exact given matches (eg: two_pair only accepts
+4 cards). An Evaluator can take all cards in a "Hand" *(Hand is not yet
+defined in specification or implementation)* and give a complete evaluation
+of the hands worth. To make a PokerEvaluator work for two_pair; one way you
+could implement it is with
+
+```ruby
+hand.combination(4).detect {|cards| two_pair(cards)}
+```
+
+but this is a very inefficient way to implement this. Perhaps a more
+efficient way would be to use groupings
+
+```ruby
+hand.group_by(&:rank).values.count {|group| group.length == 2} > 1
+```
+
+But that's pretty mutch the gist of it. The Evaluators can give the
+entire hand evaluation where-as Rules are specific scenarios.
+
+**Ranker** is a card evaluation object that is passed into a Card when
+the Cards are first initialized. Each Card holds its own Ranker
+object.
+
##License
The MIT License (MIT)
Copyright (c) 2015 by Daniel P. Clark