Class: Patience::Stock
Overview
Instance Attribute Summary
Attributes inherited from Area
Instance Method Summary collapse
-
#initialize(cards) ⇒ Stock
constructor
A new instance of Stock.
Methods inherited from Area
#add_from, #cards, #draw_on, #hit?, #pos, #pos=
Constructor Details
#initialize(cards) ⇒ Stock
Returns a new instance of Stock.
13 14 15 16 17 |
# File 'lib/patience/stock.rb', line 13 def initialize(cards) super(cards, 1) self.piles.first.cards += @cards.shuffle_off!(24).each(&:face_down) self.pos = [31, 27] end |