Sha256: 7af140a6e7315eb1c1b7e858ccedbe98da0b2a6e91547459120ca07277fae946

Contents?: true

Size: 511 Bytes

Versions: 3

Compression:

Stored size: 511 Bytes

Contents

require 'acpc_poker_types/match_state'

# Receives match state strings.
class MatchStateReceiver

  # Receives a match state string from the given +connection+.
  # @param [#gets] connection The connection from which a match state string should be received.
  # @return [MatchState] The match state string that was received from the +connection+ or +nil+ if none could be received.
  def self.receive_match_state(connection)
    raw_match_state = connection.gets
    MatchState.parse raw_match_state
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acpc_poker_basic_proxy-0.0.3 lib/acpc_poker_basic_proxy/communication_logic/match_state_receiver.rb
acpc_poker_basic_proxy-0.0.2 lib/acpc_poker_basic_proxy/communication_logic/match_state_receiver.rb
acpc_poker_basic_proxy-0.0.1 lib/acpc_poker_basic_proxy/communication_logic/match_state_receiver.rb