Class: CardDeck::Deck

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

Overview

Cards are stored in these objects

Instance Method Summary collapse

Instance Method Details

#discard(card) ⇒ Object

Adds ‘card’ to the deck. Used with Hand#play.



97
# File 'lib/99_game.rb', line 97

def discard(card); @cards.push card; end

#drawObject

Draw from the deck



95
# File 'lib/99_game.rb', line 95

def draw; @cards.shift; end