cards_lib 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1a535938b1ccabe52ed11454cf8907ad712d834
4
- data.tar.gz: 552bc7a4f92ad622c05257c24b66223fd40d0d9b
3
+ metadata.gz: d73d586f222c4bd055aa9b0ec6cb38c229b59720
4
+ data.tar.gz: 6d4e6ef04c726373a4357ec23b9f09f64df24351
5
5
  SHA512:
6
- metadata.gz: 0e3c461b3f7523f2a44adbd44a6837300f9ef40f72a48a2be75a83d3dd8212979615574f64302084c43553e093fb7e5eff26c22fa7d6fe01aa6a8c9f3fa39a3e
7
- data.tar.gz: 1153018fb2deb6dcf338c4e06c895667bad499157b59d35197c2ecae5b7078418aed32c14c01080ab572086deae517a95b1ed5d97a3056e15b639a22f89b6ec0
6
+ metadata.gz: b8b51c87c5112c8e613133ed0f54c5a01d479b93f3e297276daed456008244828003e2ab239cc9a8eeb300801a0f06863b1f4cbe50796e949f4896d5b8d01af3
7
+ data.tar.gz: 2d42c8518f4639e562985b1a2653e9f82ed01db1a4226d7d5db38e98288ab93e715e1b6ec1288057043c73581ae6c9d9cc42ee732db67ff8c51741cbef1251b9
@@ -1,7 +1,8 @@
1
1
  module CardsLib
2
2
  class Deck
3
- def initialize(cards = Standard::PLAYING_CARDS, options = {})
4
- @seed = options.fetch(:seed) { Random.new.seed }
3
+ def initialize(options = {})
4
+ cards = options.fetch(:cards) { Standard::PLAYING_CARDS }
5
+ @seed = options.fetch(:seed) { Random.new.seed }
5
6
  @top = 0
6
7
  @cards = cards.map {|c| Card.new(c) }.shuffle(random: Random.new(@seed)).to_enum
7
8
  end
@@ -1,3 +1,3 @@
1
1
  module CardsLib
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cards_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark