You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
415 B
24 lines
415 B
package Minesweeper;
|
|
|
|
import javax.swing.JButton;
|
|
|
|
enum CellType{Number, Bomb}
|
|
public class Cell extends JButton {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
public CellType type;
|
|
public boolean flagged = false;
|
|
public int value = 0;
|
|
|
|
public Cell(CellType _type) {
|
|
type = _type;
|
|
}
|
|
|
|
public void update() {
|
|
if(type == CellType.Number) {
|
|
setText(String.valueOf(value));
|
|
} else {
|
|
|
|
}
|
|
}
|
|
}
|