Browse Source

Flagged cells will not be flooded

feature_Minesweeper_Playfield
kfkama 3 years ago
parent
commit
7de023fa3e
  1. 2
      src/main/java/Minesweeper/Cell.java
  2. 3
      src/main/java/Minesweeper/MinesweeperGame.java

2
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;
}

3
src/main/java/Minesweeper/MinesweeperGame.java

@ -25,7 +25,4 @@ public class MinesweeperGame extends JPanel {
f.setLayout(null);
f.setVisible(true);
}
}
Loading…
Cancel
Save