lib/99_game.rb in 99_game-3.0.1.pre.102 vs lib/99_game.rb in 99_game-3.0.1
- old
+ new
@@ -35,11 +35,11 @@
end
end
# Expected errors
class CardError < Exception; end
class CardDeck::Card # Represents a card in the deck
- # Backup method for Card#value
+ # Value of the card
def value
return case @num
when "Ace" then 1
when 2..3 then @num
when 4 then 0
@@ -78,10 +78,10 @@
i += 1
end
end
# Allows you to see your cards.
def view
- print "\tThese are your cards: "
+ print "\tThese are your cards: "
@hand.each {|card| print "\t#{card.num}"}
end
alias inspect hand
end
# Combines sleep and a newline. 'p' is the amount of time waited.