load 'deck_of_cards.rb'
# => true
deck = DeckOfCards.new
# => #<DeckOfCards:0x007f92c31b3ac0 @cards=[#<2 of Clubs valued at 1>, #<3 of Clubs valued at 2>, ...]>
deck.deal 3
# => [#<2 of Clubs valued at 1>, #<3 of Clubs valued at 2>, #<4 of Clubs valued at 3>]
card_one = deck.draw_first
# => [#<2 of Spades valued at 1>
card_two = deck.draw_random
# => [#<4 of Diamonds valued at 3>
card_one > card_two
# => false
-
Notifications
You must be signed in to change notification settings - Fork 0
a-maas/deck_of_cards
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Implementation of a deck of cards in Ruby
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published