⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mine.java

📁 模拟扫雷小游戏
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -