Class: OfcpScoring::RoyaltiesCalculator
- Inherits:
-
Object
- Object
- OfcpScoring::RoyaltiesCalculator
- Defined in:
- lib/ofcp_scoring/royalties_calculator.rb
Constant Summary collapse
- MIDDLE =
{ "StraightFlush" => 20, "FourOfAKind" => 16, "FullHouse" => 12, "Flush" => 8, "Straight" => 4, "Pair" => 0, "HighCard" => 0 }
- BACK =
{ "RoyalFlush" => 20, "StraightFlush" => 10, "FourOfAKind" => 8, "FullHouse" => 6, "Flush" => 4, "Straight" => 2, "Pair" => 0, "HighCard" => 0 }
Instance Method Summary collapse
Instance Method Details
#calculate_bonus(hand, position) ⇒ Object
13 14 15 16 17 |
# File 'lib/ofcp_scoring/royalties_calculator.rb', line 13 def calculate_bonus(hand, position) return calculate_front(hand) if position == :front return calculate_middle(hand) if position == :middle return calculate_back(hand) if position == :back end |