Ejemplo n.º 1
0
 def decode(cls, obj):
     type = GameTypeEnum.parse(obj['OptionType'])
     if type == GameTypeEnum.CommunityCardsPoker:
         return GameTypeOptionsCommunity.decode(obj)
     if type == GameTypeEnum.DrawPoker:
         return GameTypeOptionsDraw.decode(obj)
     if type == GameTypeEnum.StudPoker:
         return GameTypeOptionsStud.decode(obj)
     return None
Ejemplo n.º 2
0
 def decode(cls, obj):
     return cls(
         GameTypeEnum.parse(obj['GameType']),
         [GameSubTypeEnum.parse(x) for x in obj['AvailableVariants']],
         [LimitTypeEnum.parse(x) for x in obj['AvailableLimits']],
         [BlindTypeEnum.parse(x) for x in obj['AvailableBlinds']],
         obj["MinPlayers"],
         obj["MaxPlayers"]
     )