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

📄 blank.java

📁 经典8数码问题扩展为N数码问题
💻 JAVA
字号:

public class Blank  {
	public int x;
	public int y;
	public Blank(){
		x=0;
		y=0;
	}
	public boolean exchange(Nod nod) {
		if (nod.n==0)return false;
		int t=nod.x;
		nod.x=this.x;
		this.x=t;
		t=nod.y;
		nod.y=this.y;
		this.y=t;
		return true;
	}
	public void setf(boolean[] f,int N){
		if(x>0)f[1]=true;
		if(y>0)f[4]=true;
		if(x<N)f[2]=true;
		if(y<N)f[3]=true;
	}
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -