Browse Source

Refactore Playfield

feature_Minesweeper_Playfield
kfkama 3 years ago
parent
commit
30903220e9
  1. 3
      src/main/java/Minesweeper/MinesweeperGame.java
  2. 4
      src/main/java/Minesweeper/Playfield.java

3
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);
}
}

4
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];

Loading…
Cancel
Save