Sha256: 4e495a3830593dca5524e26d6fae082fa968f2ed89442e67ff941d9ee3d50de4
Contents?: true
Size: 431 Bytes
Versions: 4
Compression:
Stored size: 431 Bytes
Contents
require 'blackjack_jp/card' module BlackjackJp class Deck attr_reader :deck def initialize marks = BlackjackJp::Card.new.mark numbers = BlackjackJp::Card.new.number @deck = make_deck(marks, numbers) end private def make_deck(marks, numbers) deck = [] numbers.each do |n| marks.each do |m| deck.push [n, m] end end deck end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
blackjack_jp-0.1.3 | lib/blackjack_jp/deck.rb |
blackjack_jp-0.1.2 | lib/blackjack_jp/deck.rb |
blackjack_jp-0.1.1 | lib/blackjack_jp/deck.rb |
blackjack_jp-0.1.0 | lib/blackjack_jp/deck.rb |