From 493b116f73ec3912ca7af3d6ece3434279cbcfb5 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 9 Mar 2018 13:38:22 +0100 Subject: renamed the project SwiftStory Signed-off-by: Olivier Gayot --- swiftstory/Cards.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 swiftstory/Cards.py (limited to 'swiftstory/Cards.py') diff --git a/swiftstory/Cards.py b/swiftstory/Cards.py new file mode 100644 index 0000000..78dd64a --- /dev/null +++ b/swiftstory/Cards.py @@ -0,0 +1,13 @@ +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') as fd: + return [line.strip() for line in fd] + + @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') as fd: + return [line.strip() for line in fd] -- cgit v1.2.3