@ -62,16 +62,20 @@ public class Cell extends JButton {
if (isEnabled()) {
if (flagged) {
flagged = false;
if (type == CellType.Number) {
setBackground(Color.gray);
playfield.cellDried();
} else {
setBackground(Color.red);
}
flagged = true;
setBackground(Color.cyan);
playfield.cellFlooded();
@ -134,4 +134,8 @@ public class Playfield {
System.exit(0);
public void cellDried() {
cellsFlooded--;