diff --git a/src/main/java/Minesweeper/Cell.java b/src/main/java/Minesweeper/Cell.java index 9f6cc0c..d67ba5b 100644 --- a/src/main/java/Minesweeper/Cell.java +++ b/src/main/java/Minesweeper/Cell.java @@ -85,7 +85,7 @@ public class Cell extends JButton { } public void flood() { - if (type == CellType.Bomb) { + if (type == CellType.Bomb || flagged) { return; } diff --git a/src/main/java/Minesweeper/MinesweeperGame.java b/src/main/java/Minesweeper/MinesweeperGame.java index c3b9af4..9570e80 100644 --- a/src/main/java/Minesweeper/MinesweeperGame.java +++ b/src/main/java/Minesweeper/MinesweeperGame.java @@ -25,7 +25,4 @@ public class MinesweeperGame extends JPanel { f.setLayout(null); f.setVisible(true); } - - - -} +} \ No newline at end of file diff --git a/src/main/java/Minesweeper/Playfield.java b/src/main/java/Minesweeper/Playfield.java index 2a1806e..754dd52 100644 --- a/src/main/java/Minesweeper/Playfield.java +++ b/src/main/java/Minesweeper/Playfield.java @@ -134,4 +134,4 @@ public class Playfield { System.exit(0); } } -} +} \ No newline at end of file