def __str__(self):
     return "{0} => {1} ({2}) ({3})".format(
         super().__str__(),
         self.implemented_protocol_version,
         ", ".join([LobbyTypeEnum.to_string(x) for x in self.supported_lobby_types]),
         ", ".join([x.__str__() for x in self.rules]),
     )
예제 #2
0
 def __init__(self, obj):
     super().__init__(obj, CheckCompatibilityCommand(obj['Command']))
     self.implemented_protocol_version = obj['ImplementedProtocolVersion']
     self.supported_lobby_types = [
         LobbyTypeEnum.parse(x) for x in obj['SupportedLobbyTypes']
     ]
     self.rules = [RuleInfo(x) for x in obj['Rules']]
예제 #3
0
 def _encode_specific(self, d):
     super()._encode_specific(d)
     d['ImplementedProtocolVersion'] = self.implemented_protocol_version
     d['SupportedLobbyTypes'] = [
         LobbyTypeEnum.to_string(x) for x in self.supported_lobby_types
     ]
     d['Rules'] = [x.encode() for x in self.rules]
 def __init__(self, obj):
     super().__init__(obj, CheckCompatibilityCommand(obj["Command"]))
     self.implemented_protocol_version = obj["ImplementedProtocolVersion"]
     self.supported_lobby_types = [LobbyTypeEnum.parse(x) for x in obj["SupportedLobbyTypes"]]
     self.rules = [RuleInfo(x) for x in obj["Rules"]]
 def _encode_specific(self, d):
     super()._encode_specific(d)
     d["ImplementedProtocolVersion"] = self.implemented_protocol_version
     d["SupportedLobbyTypes"] = [LobbyTypeEnum.to_string(x) for x in self.supported_lobby_types]
     d["Rules"] = [x.encode() for x in self.rules]
 def __str__(self):
     return '{0} ({1})'.format(
         super().__str__(),
         ', '.join([LobbyTypeEnum.to_string(x) for x in self.lobby_types])
     )
 def __init__(self, obj):
     super().__init__(obj)
     self.lobby_types = [LobbyTypeEnum.parse(x) for x in obj['LobbyTypes']]
 def _encode_specific(self, d):
     super()._encode_specific(d)
     d['LobbyTypes'] = [LobbyTypeEnum.to_string(x) for x in self.lobby_types]
예제 #9
0
 def __str__(self):
     return '{0} ({1})'.format(
         super().__str__(),
         ', '.join([LobbyTypeEnum.to_string(x) for x in self.lobby_types]))
예제 #10
0
 def __init__(self, obj):
     super().__init__(obj)
     self.lobby_types = [LobbyTypeEnum.parse(x) for x in obj['LobbyTypes']]
예제 #11
0
 def _encode_specific(self, d):
     super()._encode_specific(d)
     d['LobbyTypes'] = [
         LobbyTypeEnum.to_string(x) for x in self.lobby_types
     ]
예제 #12
0
 def __str__(self):
     return '{0} => {1} ({2}) ({3})'.format(
         super().__str__(), self.implemented_protocol_version, ', '.join([
             LobbyTypeEnum.to_string(x) for x in self.supported_lobby_types
         ]), ', '.join([x.__str__() for x in self.rules]))