block.java

来自「用java写的一个扫雷游戏。界面设计用jigloo完成。」· Java 代码 · 共 27 行

JAVA
27
字号
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 + =
减小字号Ctrl + -
显示快捷键?