Class: Shoe

Inherits:
Deck show all
Defined in:
lib/blackjack/shoe.rb

Instance Method Summary collapse

Methods inherited from Deck

#cards, #cards_left, #draw, #shuffle, #shuffle!, #to_s

Constructor Details

#initialize(decks = 4, shuffle = true) ⇒ Shoe

Returns a new instance of Shoe.



5
6
7
8
9
# File 'lib/blackjack/shoe.rb', line 5

def initialize(decks=4, shuffle=true)
  @cards = []
  decks.times { @cards = @cards + Deck.new().cards }
  self.shuffle! if shuffle
end