diff --git a/src/main/java/Minesweeper/Cell.java b/src/main/java/Minesweeper/Cell.java index 4991e9e..f8535eb 100644 --- a/src/main/java/Minesweeper/Cell.java +++ b/src/main/java/Minesweeper/Cell.java @@ -91,7 +91,9 @@ public class Cell extends JButton { public void reveal() { if (type == CellType.Number) { - setText(String.valueOf(value)); + if(value > 0) { + setText(String.valueOf(value)); + } } else { setBackground(MINECOLOR); } @@ -104,6 +106,7 @@ public class Cell extends JButton { setBackground(FLOODEDCOLOR); setEnabled(false); + reveal(); playfield.cellFlooded(); if (value == 0) {