From d02771be0e162e19c0b07780841b949ce8d6ebd1 Mon Sep 17 00:00:00 2001 From: Groosha Date: Sun, 5 Sep 2021 10:28:38 +0300 Subject: [PATCH] Use empty symbol for open empty squares See https://www.compart.com/en/unicode/U+2800 --- bot/keyboards/kb_minefield.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/keyboards/kb_minefield.py b/bot/keyboards/kb_minefield.py index ec96bad..58a7544 100644 --- a/bot/keyboards/kb_minefield.py +++ b/bot/keyboards/kb_minefield.py @@ -26,7 +26,10 @@ def make_keyboard_from_minefield(cells: List[List], game_id: str, click_mode: st text="🚩", callback_data=cb_switch_flag.new(game_id=game_id, action="remove", x=x, y=y) ) else: # mask_value == CellMask.OPEN - btn = InlineKeyboardButton(text=cell["value"], callback_data=cb_ignore.new(x=x, y=y)) + val = cell["value"] + if val == 0: + val = "⠀" # Empty symbol + btn = InlineKeyboardButton(text=val, callback_data=cb_ignore.new(x=x, y=y)) kb_row.append(btn) keyboard.row(*kb_row)