From 39aad0cc9f89e71b972e089e20fd43f762950ca4 Mon Sep 17 00:00:00 2001 From: Flowiee <55394031+Flowiee@users.noreply.github.com> Date: Thu, 17 Oct 2019 16:58:11 +0200 Subject: [PATCH] Update utils.py --- utils.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 23b90b6..eabc225 100644 --- a/utils.py +++ b/utils.py @@ -25,6 +25,7 @@ from telegram.ext.dispatcher import run_async from internationalization import _, __ from mwt import MWT from shared_vars import gm +import card as c logger = logging.getLogger(__name__) @@ -75,7 +76,25 @@ def display_color_group(color, game): if color == "y": return __("{emoji} Yellow", game.translate).format( emoji='๐Ÿ’›') - + + +def display_card_text(card): + if card.special == c.DRAW_FOUR: + return __("โฌ›๏ธ+4") + if card.special == c.CHOOSE: + return __("โฌ›๏ธColor Chooser") + if card.value == c.DRAW_TWO: + if card.color == 'r': + return __("โค๏ธ+2") + if card.color == 'b': + return __("๐Ÿ’™+2") + if card.color == 'g': + return __("๐Ÿ’š+2") + if card.color == 'y': + return __("๐Ÿ’›+2") + else: + return repr(card) + def error(bot, update, error): """Simple error handler"""