class CardDeck::Card

Public Instance Methods

value() click to toggle source

The card's value

# File lib/card_war.rb, line 4
def value
    case @num
        when 2..10 then @num.to_i
        when "Jack" then 11
        when "Queen" then 12
        when "King" then 13
        when "Ace" then 14
    end
end