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
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"] )