Class: CardDeck::Card
- Inherits:
-
Object
- Object
- CardDeck::Card
- Defined in:
- lib/card_war.rb
Instance Method Summary collapse
-
#value ⇒ Object
The card’s value.
Instance Method Details
#value ⇒ Object
The card’s value
4 5 6 7 8 9 10 11 12 |
# 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 |