|
@ -91,7 +91,9 @@ public class Cell extends JButton { |
|
|
|
|
|
|
|
|
public void reveal() { |
|
|
public void reveal() { |
|
|
if (type == CellType.Number) { |
|
|
if (type == CellType.Number) { |
|
|
setText(String.valueOf(value)); |
|
|
|
|
|
|
|
|
if(value > 0) { |
|
|
|
|
|
setText(String.valueOf(value)); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
setBackground(MINECOLOR); |
|
|
setBackground(MINECOLOR); |
|
|
} |
|
|
} |
|
@ -104,6 +106,7 @@ public class Cell extends JButton { |
|
|
|
|
|
|
|
|
setBackground(FLOODEDCOLOR); |
|
|
setBackground(FLOODEDCOLOR); |
|
|
setEnabled(false); |
|
|
setEnabled(false); |
|
|
|
|
|
reveal(); |
|
|
playfield.cellFlooded(); |
|
|
playfield.cellFlooded(); |
|
|
|
|
|
|
|
|
if (value == 0) { |
|
|
if (value == 0) { |
|
|