📄 towerpoint.java
字号:
package honnoira;
import java.awt.*;
public class TowerPoint
{
int x,y;
boolean isPlate;
Disk plate=null;
HannoiTower con=null;
public TowerPoint(int x,int y,boolean boo)
{
this.x=x;
this.y=y;
isPlate=boo;
}
public boolean isThere()
{
return isPlate;
}
public void setisPlate(boolean boo)
{
isPlate=boo;
}
public int getX()
{
return x;
}
public int getY()
{
return y;
}
public void putPlate(Disk plate,HannoiTower con)
{
this.con=con;
con.setLayout(null);
this.plate=plate;
con.add(plate);
int w=plate.getBounds().width;
int h=plate.getBounds().height;
plate.setBounds(x-w/2,y-h/2,w,h);
isPlate=true;
con.validate();
}
public Disk getPlate()
{
return plate;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -