Skip to content

Commit

Permalink
Use empty symbol for open empty squares
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterGroosha committed Sep 5, 2021
1 parent 150290f commit d02771b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bot/keyboards/kb_minefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d02771b

Please sign in to comment.