This commit is contained in:
2025-08-29 12:01:50 -05:00
parent 000b119641
commit 94ebef11bd
11 changed files with 7 additions and 50 deletions

View File

@@ -6,7 +6,6 @@ from typing import Optional, Set, Tuple
from .. import db
# --- Config (override via constants.py if present) ---
try:
from ..utils.constants import (
MINES_MIN_BET, MINES_EDGE_PER_STEP, MINES_MAX_MULT, MINES_CHOICES
@@ -170,7 +169,6 @@ class MinesView(discord.ui.View):
for c in range(GRID_N):
idx = coord_to_idx((r, c))
if idx in revealed:
# if we want the clicked bomb to show as 💥 even if counted as revealed, prefer 💥
if show_mines and hit_idx is not None and idx == hit_idx:
row_emojis.append(EMO_HIT)
else:
@@ -229,7 +227,6 @@ class MinesView(discord.ui.View):
]
e.description = "\n".join(desc)
# NEW: show snapshot board if present
if self.last_summary is not None and self.last_summary.get("board"):
e.add_field(name="Board", value=self.last_summary["board"], inline=False)
@@ -306,13 +303,11 @@ class MinesView(discord.ui.View):
self._busy = True
idx = coord_to_idx(rc)
# already revealed?
if idx in self.revealed:
self._busy = False
return
if idx in self.mines:
# build snapshot BEFORE resetting: show all mines and mark the hit
snapshot_board = self._grid_text(
show_mines=True, with_labels=True,
mines=set(self.mines), revealed=set(self.revealed), hit_idx=idx
@@ -335,7 +330,6 @@ class MinesView(discord.ui.View):
self._busy = False
return
# success — update multiplier and state
step_mult = step_multiplier(self.total_rem, self.safe_rem)
self.mult = min(self.mult * step_mult, MINES_MAX_MULT)
self.revealed.add(idx)