import json class Cards: @staticmethod def get_white_cards(lang): ''' Read the file containing the white cards and return a list of cards ''' with open('usr/share/swiftstory/lang/' + lang + '/cards/white.json') as fh: return json.load(fh) @staticmethod def get_black_cards(lang): ''' Read the file containing the black cards and return a list of cards ''' with open('usr/share/swiftstory/lang/' + lang + '/cards/black.json') as fh: return json.load(fh)