Пример #1
0
 def decode(cls, obj):
     type = LobbyTypeEnum.parse(obj['OptionType'])
     if type == LobbyTypeEnum.QuickMode:
         return LobbyOptionsQuickMode.decode(obj)
     if type == LobbyTypeEnum.RegisteredMode:
         return LobbyOptionsRegisteredMode.decode(obj)
     return None
 def decode(cls, obj):
     return cls(
         obj['Success'],
         BluffinMessageIdEnum.parse(obj['MessageId']),
         obj['Message'],
         obj['Command'],
         obj['ImplementedProtocolVersion'],
         [LobbyTypeEnum.parse(x) for x in obj['SupportedLobbyTypes']],
         [GameInfo.decode(x) for x in obj['AvailableGames']]
     )
Пример #3
0
 def decode(cls, obj):
     return cls(
         [LobbyTypeEnum.parse(x) for x in obj['LobbyTypes']]
     )