Sha256: ad13d48ed57c7f3a4d4966ef667a523b2ab04506ef2ae02ca142fbaa8962477c
Contents?: true
Size: 806 Bytes
Versions: 11
Compression:
Stored size: 806 Bytes
Contents
# encoding: UTF-8 require_relative 'board' require_relative 'client_interface' require_relative 'network' # Klasse zum Starten einer neue Verbindung zum Spielserver und Verarbeiten der Nachrichten des Servers. class Runner include Logging def initialize(host, port, client, reservation = nil) logger.info 'Software Challenge 2019' logger.info 'Ruby Client' logger.info "Host: #{host}" logger.info "Port: #{port}" board = Board.new @network = Network.new(host, port, board, client, reservation) end def start @network.connect unless @network.connected logger.error 'Not connected' return end while @network.connected @network.processMessages sleep(0.01) end logger.info 'Program end...' @network.disconnect end end
Version data entries
11 entries across 11 versions & 1 rubygems