Sha256: fb09682eeea4c3583e32fca4a284b3fbed4a667eaa4601899022ab815e6aea78
Contents?: true
Size: 555 Bytes
Versions: 2
Compression:
Stored size: 555 Bytes
Contents
require 'acpc_poker_types/pile_of_cards' require 'acpc_poker_types/card' class AcpcPokerTypes::Hand < AcpcPokerTypes::PileOfCards # @return [Hand] def self.draw_cards(*cards) AcpcPokerTypes::Hand.new cards end # @param [String] acpc_string_hand ACPC string description of a hand. # @return [Hand] def self.from_acpc(acpc_string_hand) AcpcPokerTypes::Hand.new AcpcPokerTypes::Card.cards(acpc_string_hand) end def to_s join end alias_method :to_str, :to_s def to_acpc (map { |card| card.to_acpc }).join end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acpc_poker_types-2.0.0 | lib/acpc_poker_types/hand.rb |
acpc_poker_types-1.0.0 | lib/acpc_poker_types/hand.rb |