summaryrefslogtreecommitdiff
path: root/swiftstory/cards.py
blob: d570f87e7d8749c7a48c9ba2abb8e48e12a1ca84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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(f'usr/share/swiftstory/lang/{lang}/cards/white.json', encoding='utf-8') 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(f'usr/share/swiftstory/lang/{lang}/cards/black.json', encoding='utf-8') as fh:
            return json.load(fh)