📄 wall.java
字号:
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
public class Wall {
int x,y;
TankClient tc;
public static final int WI = 20;
public static final int HE = 200;
public Rectangle getRect(){
return new Rectangle(x,y,WI,HE);
}
public void draw(Graphics g){
Color c = g.getColor();
g.setColor(Color.WHITE);
g.fillRect(x, y, WI, HE);
g.setColor(c);
}
public Wall(int x, int y,TankClient tc) {
this.x = x;
this.y = y;
this.tc = tc;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -