Sha256: a4f66ac40075f01a608272dc3e914e97a4fbead65d6e1323bb996ebb7c50af6d
Contents?: true
Size: 498 Bytes
Versions: 3
Compression:
Stored size: 498 Bytes
Contents
module AwesomeGameRandomizer class PlayingCard def self.draw suits = ["\u2660 Spades", "\u2665 Hearts", "\u2666 Diamonds", "\u2663 Clubs"] value = rand(2..14) case value when 11 return "Jack of #{suits.sample}" when 12 return "Queen of #{suits.sample}" when 13 return "King of #{suits.sample}" when 14 return "Ace of #{suits.sample}" else return "#{value} of #{suits.sample}" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems