Sha256: d69be64a2dea6959b1edb15fa95870881ee520f5bb51952a486ca6fdb30e53de
Contents?: true
Size: 275 Bytes
Versions: 2
Compression:
Stored size: 275 Bytes
Contents
require "twenty_one/card" module TwentyOne class Hand attr_reader :cards def initialize(cards = []) @cards = cards end def clear @cards = [] end def value count = 0 @cards.each do |card| count += card.value end count end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twenty_one-0.1.1 | lib/twenty_one/hand.rb |
twenty_one-0.1.0 | lib/twenty_one/hand.rb |