Class: CardDeck::Deck
- Inherits:
-
Object
- Object
- CardDeck::Deck
- Defined in:
- lib/99_game.rb
Overview
Cards are stored in these objects
Instance Method Summary collapse
-
#discard(card) ⇒ Object
Adds ‘card’ to the deck.
-
#draw ⇒ Object
Draw from the deck.
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 |
#draw ⇒ Object
Draw from the deck
95 |
# File 'lib/99_game.rb', line 95 def draw; @cards.shift; end |