diff --git a/src/main/java/Minesweeper/Cell.java b/src/main/java/Minesweeper/Cell.java index c2a3f33..7b5e0de 100644 --- a/src/main/java/Minesweeper/Cell.java +++ b/src/main/java/Minesweeper/Cell.java @@ -43,6 +43,8 @@ public class Cell extends JButton { public void update() { if (type == CellType.Number) { setText(String.valueOf(value)); + } else { + setBackground(Color.RED); } } diff --git a/src/main/java/Minesweeper/Playfield.java b/src/main/java/Minesweeper/Playfield.java index 1cefcbf..14f0a81 100644 --- a/src/main/java/Minesweeper/Playfield.java +++ b/src/main/java/Minesweeper/Playfield.java @@ -38,6 +38,7 @@ public class Playfield { for (int k = 0; k < bPlacement.length; k++) { if (bPlacement[k] == i * Size + j) { cells[i][j].type = CellType.Bomb; + cells[i][j].update(); break; } }