mine.java
来自「模拟扫雷小游戏」· Java 代码 · 共 26 行
JAVA
26 行
import javax.swing.*;
public class Mine extends JButton
{
public int num_x,num_y; //the row number,the column number.
public int MineFlag; //count of marked squares.
public int MineRoundCount; //Mine numbers around.
public boolean isMine; //is it Mine or not?
public boolean isClicked; //is it clicked or not?
public boolean isRight; //is it right clicked or not?
public boolean isEnabled; //is the button set enabled or not?
public Mine(int x,int y)
{
/* default values for those variables above */
num_x = x;
num_y = y;
MineFlag = 0;
MineRoundCount = 0;
isMine = false;
isClicked = false;
isRight = false;
isEnabled=true;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?