From abad6edd6ee2eeb03fc311c917f7ec3af589e2c4 Mon Sep 17 00:00:00 2001 From: Hyper Date: Mon, 23 Mar 2026 21:46:00 +0800 Subject: [PATCH] feat: git is very easy --- minesweeper/game/board.py | 3 ++- minesweeper/game/logic.py | 1 + minesweeper/game/state.py | 2 +- minesweeper/nothing.txt | 1 + minesweeper/ui/board_view.py | 4 ++-- minesweeper/ui/widgets.py | 3 +++ 6 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 minesweeper/nothing.txt diff --git a/minesweeper/game/board.py b/minesweeper/game/board.py index 92cca80..c9ed7ed 100644 --- a/minesweeper/game/board.py +++ b/minesweeper/game/board.py @@ -11,7 +11,8 @@ (3, 3), (6, 4), (2, 6), - (7, 7), + (3, 4), + (5, 6), } diff --git a/minesweeper/game/logic.py b/minesweeper/game/logic.py index 6f6ebc5..00c1ad8 100644 --- a/minesweeper/game/logic.py +++ b/minesweeper/game/logic.py @@ -13,6 +13,7 @@ def reveal_cells(board: list[list[Cell]], x: int, y: int) -> list[Cell]: cell.revealed = True revealed_cells = [cell] + print("PixelCat <3") # TODO: Implement flood fill so revealing an empty cell also reveals nearby # empty neighbors and their borders. Right now the starter only reveals one diff --git a/minesweeper/game/state.py b/minesweeper/game/state.py index 9c075d1..6f14bf4 100644 --- a/minesweeper/game/state.py +++ b/minesweeper/game/state.py @@ -24,7 +24,7 @@ def reveal_cell(self, x: int, y: int) -> list[Cell]: if changed_cells: cell = changed_cells[-1] - self.status_text = f"Revealed ({cell.x}, {cell.y})" + self.status_text = f"Reeee ({cell.x}, {cell.y})" return changed_cells diff --git a/minesweeper/nothing.txt b/minesweeper/nothing.txt new file mode 100644 index 0000000..a174840 --- /dev/null +++ b/minesweeper/nothing.txt @@ -0,0 +1 @@ +now it has something yee :) diff --git a/minesweeper/ui/board_view.py b/minesweeper/ui/board_view.py index 793113a..7f3d3c0 100644 --- a/minesweeper/ui/board_view.py +++ b/minesweeper/ui/board_view.py @@ -48,13 +48,13 @@ def __init__(self, status_text: str) -> None: } BoardView CellButton.-revealed { - background: #eceff4; + background: #00ff00; color: #2e3440; border: round #d8dee9; } BoardView CellButton.-empty { - color: #a0aec0; + color: #ff0000; } BoardView CellButton.-mine { diff --git a/minesweeper/ui/widgets.py b/minesweeper/ui/widgets.py index 622502b..deaddc0 100644 --- a/minesweeper/ui/widgets.py +++ b/minesweeper/ui/widgets.py @@ -24,6 +24,9 @@ def _label_for(cell: Cell) -> str: if cell.adjacent_mines == 0: return " " + if cell.adjacent_mines == 100: + return "?" + return str(cell.adjacent_mines) def sync_with_cell(self, cell: Cell) -> None: