Class: CardDeck::Card

Inherits:
Object
  • Object
show all
Defined in:
lib/card.rb

Instance Method Summary collapse

Instance Method Details

#valueObject

The points a card is worth



3
4
5
6
7
8
9
10
11
# File 'lib/card.rb', line 3

def value # The points a card is worth
	case num
		when 2..10 then num.to_i
		when "Ace" then 11
		when "Jack" then 10
		when "Queen" then 10
		when "King" then 10
	end
end