Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion minesweeper/game/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
(3, 3),
(6, 4),
(2, 6),
(7, 7),
(3, 4),
(5, 6),
}


Expand Down
1 change: 1 addition & 0 deletions minesweeper/game/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion minesweeper/game/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions minesweeper/nothing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
now it has something yee :)
4 changes: 2 additions & 2 deletions minesweeper/ui/board_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions minesweeper/ui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading