diff --git a/src/main/java/Minesweeper/MinesweeperGame.java b/src/main/java/Minesweeper/MinesweeperGame.java index 1741988..cf07347 100644 --- a/src/main/java/Minesweeper/MinesweeperGame.java +++ b/src/main/java/Minesweeper/MinesweeperGame.java @@ -8,12 +8,14 @@ public class MinesweeperGame extends JPanel { private static final long serialVersionUID = 1L; public static final int WIDTH = 600, HEIGTH = 600; public Playfield playfield; + public TimerLable tl; public MinesweeperGame(int _playfieldSize, int _bombAmount) { this.setSize(WIDTH, HEIGTH); setLayout(null); playfield = new Playfield(this, _playfieldSize, _bombAmount); - TimerLable tl = new TimerLable(); + + tl = new TimerLable(); tl.setBounds((WIDTH / 2 - 5), HEIGTH / 2 - 240, 20, 20); add(tl); tl.start(); diff --git a/src/main/java/Minesweeper/Playfield.java b/src/main/java/Minesweeper/Playfield.java index 9e73cb8..425f4f2 100644 --- a/src/main/java/Minesweeper/Playfield.java +++ b/src/main/java/Minesweeper/Playfield.java @@ -69,6 +69,7 @@ public class Playfield { MsG.remove(cells[i][j]); } } + MsG.tl.reset(); generatePlayfield(); }