teeworlds_network/lib/server_info.rb
2022-11-05 17:19:05 +01:00

15 lines
278 B
Ruby

class ServerInfo
attr_reader :version, :name, :map, :gametype
def initialize(infos)
@version = infos[0]
@name = infos[1]
@map = infos[2]
@gametype = infos[3]
end
def to_s
"version=#{@version} gametype=#{gametype} map=#{map} name=#{name}"
end
end