class BlackjackJp::Person

Attributes

deck[RW]
hand[RW]
name[RW]

Public Class Methods

new(name, deck, hand=[]) click to toggle source
# File lib/blackjack_jp/person.rb, line 5
def initialize(name, deck, hand=[])
  @name = name
  @deck = deck.shuffle
  @hand = hand
end

Public Instance Methods

draw(num = 1) click to toggle source
# File lib/blackjack_jp/person.rb, line 11
def draw(num = 1)
  @hand += @deck.shift(num)
end