📄 block.java
字号:
package minesweep;
import javax.swing.JButton;
public class block extends JButton{
/**
*
*/
private static final long serialVersionUID = 1L;
int x,y; //the location of the block
int BombsNumAround; //Number of Bombs around of the block
int isBomb; //Whether the Block has a Bomb
boolean isClicked; //Whether the block has been clicked
boolean isRight; //Whether the block bas been clicked by right button
int BombFlag; //a flag donates the user considers the block has a bomb
block(int a, int b){
x=a;
y=b;
BombsNumAround=0;
isBomb = 0;
isClicked =false;
isRight =false;
BombFlag =0;
// mblock.setPreferredSize(new Dimension(16,16));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -