Sha256: 363623fcb32352f84d3503c375ade6672b0e84748ca47ee07f60d7410a2bcc4e
Contents?: true
Size: 422 Bytes
Versions: 2
Compression:
Stored size: 422 Bytes
Contents
module RubyQuiz1 class StandardDeck < Deck def initialize add_cards super end private def add_cards {club: 0, diamond: 13, heart: 26, spade: 39}.each do |suit_name, suit_value| suit = Suit.new(suit_name, suit_value) (1..13).each do |card_value| cards << Card.new(card_value, suit) end end 2.times { cards << Joker.new } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby_quiz_1-0.0.2 | lib/ruby_quiz_1/decks/standard_deck.rb |
ruby_quiz_1-0.0.1 | lib/ruby_quiz_1/decks/standard_deck.rb |