Sha256: c33199a72d087db0d6a26e41f2a97eb6c7c451c14edaf39a6754603879dcfc9e

Contents?: true

Size: 595 Bytes

Versions: 5

Compression:

Stored size: 595 Bytes

Contents

module CardsLib
  module Standard
    module Rankers
      class BlackjackRanker < CardsLib::Ranker
        def initialize(card)
          super(
            card,
            {
              "2" => 2,
              "3" => 3,
              "4" => 4,
              "5" => 5,
              "6" => 6,
              "7" => 7,
              "8" => 8,
              "9" => 9,
              "T" => 10,
              "J" => 10,
              "Q" => 10,
              "K" => 10,
              "A" => 11
            },
            ->rank{@ranks[rank]}
          )
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cards_lib-0.2.4 lib/cards_lib/standard/rankers/blackjack_ranker.rb
cards_lib-0.2.3 lib/cards_lib/standard/rankers/blackjack_ranker.rb
cards_lib-0.2.2 lib/cards_lib/standard/rankers/blackjack_ranker.rb
cards_lib-0.2.1 lib/cards_lib/standard/rankers/blackjack_ranker.rb
cards_lib-0.2.0 lib/cards_lib/standard/rankers/blackjack_ranker.rb