@ -13,4 +13,12 @@ public class Cell extends JButton {
public Cell(CellType _type) {
type = _type;
}
public void update() {
if(type == CellType.Number) {
setText(String.valueOf(value));
} else {
@ -18,7 +18,7 @@ public class MinesweeperGame extends JPanel {
public static void main(String[] args) {
JFrame f = new JFrame();
MinesweeperGame ttt = new MinesweeperGame(3, 0);
MinesweeperGame ttt = new MinesweeperGame(8, 10);
f.add(ttt);
f.setSize(WIDTH, HEIGTH);
@ -99,6 +99,8 @@ public class Playfield {
cells[row][column].value++;
cells[row][column].update();