blob: 3d314c33eec126118efd1b521d8be6c94be6b267 (
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('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('usr/share/swiftstory/lang/' + lang + '/cards/black.json', encoding='utf-8') as fh:
return json.load(fh)
|