|
@ -2,6 +2,8 @@ package Minesweeper; |
|
|
|
|
|
|
|
|
import java.awt.Point; |
|
|
import java.awt.Point; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
|
|
|
|
public class Playfield { |
|
|
public class Playfield { |
|
|
|
|
|
|
|
|
private static final int CELLSIZE = 50; |
|
|
private static final int CELLSIZE = 50; |
|
@ -61,6 +63,7 @@ public class Playfield { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void reset() { |
|
|
public void reset() { |
|
|
|
|
|
JOptionPane.showMessageDialog(MsG,"KABOOM! Try again!"); |
|
|
for (int i = 0; i < Size; i++) { |
|
|
for (int i = 0; i < Size; i++) { |
|
|
for (int j = 0; j < Size; j++) { |
|
|
for (int j = 0; j < Size; j++) { |
|
|
MsG.remove(cells[i][j]); |
|
|
MsG.remove(cells[i][j]); |
|
|