diff --git a/src/main/java/Minesweeper/MinesweeperGame.java b/src/main/java/Minesweeper/MinesweeperGame.java index 231c674..c3b9af4 100644 --- a/src/main/java/Minesweeper/MinesweeperGame.java +++ b/src/main/java/Minesweeper/MinesweeperGame.java @@ -24,7 +24,8 @@ public class MinesweeperGame extends JPanel { f.setSize(WIDTH, HEIGTH); f.setLayout(null); f.setVisible(true); - } + + } diff --git a/src/main/java/Minesweeper/Playfield.java b/src/main/java/Minesweeper/Playfield.java index 14f0a81..3fc9006 100644 --- a/src/main/java/Minesweeper/Playfield.java +++ b/src/main/java/Minesweeper/Playfield.java @@ -12,6 +12,10 @@ public class Playfield { public Playfield(MinesweeperGame _MsG, int _Size, int _bombAmount) { MsG = _MsG; Size = _Size; + generatePlayfield(_bombAmount); + } + + public void generatePlayfield(int _bombAmount) { cells = new Cell[Size][Size]; @@ -53,7 +57,7 @@ public class Playfield { } } } - + public void calculateBombProximity(int row, int column) { if (row > 0) {